Package org.opentcs.data.order

# Class DriveOrder

java.lang.Object
org.opentcs.data.order.DriveOrder

All Implemented Interfaces:
  `java.io.Serializable`

    public class DriveOrder
    extends java.lang.Object
    implements java.io.Serializable

Describes a sequence of movements and an optional operation at the end that a `Vehicle` is supposed to execute.

See Also:
  `TransportOrder`, Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `DriveOrder.Destination` | Describes the destination of a drive order.
  `static class` | `DriveOrder.State` | Defines the various potential states of a drive order.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `DriveOrder​(DriveOrder.Destination destination)` | Creates a new DriveOrder.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `DriveOrder.Destination` | `getDestination()` | Returns this drive order's destination.
  `Route` | `getRoute()` | Returns this drive order's route.
  `DriveOrder.State` | `getState()` | Returns this drive order's state.
  `TCSObjectReference<TransportOrder>` | `getTransportOrder()` | Returns a reference to the transport order this drive order belongs to.
  `java.lang.String` | `toString()` |
  `DriveOrder` | `withRoute​(Route route)` | Creates a copy of this object, with the given route.
  `DriveOrder` | `withState​(DriveOrder.State state)` | Creates a copy of this object, with the given state.
  `DriveOrder` | `withTransportOrder​(TCSObjectReference<TransportOrder> transportOrder)` | Creates a copy of this object, with the given transport order.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DriveOrder

    public DriveOrder​(@Nonnull DriveOrder.Destination destination)
    Creates a new DriveOrder.
    Parameters:
      `destination` - This drive order's destination.

- ## Method Details

  - ### getDestination

    @Nonnull public DriveOrder.Destination getDestination()
    Returns this drive order's destination.
    Returns:
      This drive order's destination.

  - ### getTransportOrder

    @Nullable public TCSObjectReference<TransportOrder> getTransportOrder()
    Returns a reference to the transport order this drive order belongs to.
    Returns:
      A reference to the transport order this drive order belongs to.

  - ### withTransportOrder

    public DriveOrder withTransportOrder​(@Nullable TCSObjectReference<TransportOrder> transportOrder)
    Creates a copy of this object, with the given transport order.
    Parameters:
      `transportOrder` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getRoute

    @Nullable public Route getRoute()
    Returns this drive order's route.
    Returns:
      This drive order's route. May be `null` if this drive order's route hasn't been calculated, yet.

  - ### withRoute

    public DriveOrder withRoute​(@Nullable Route route)
    Creates a copy of this object, with the given route.
    Parameters:
      `route` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getState

    @Nonnull public DriveOrder.State getState()
    Returns this drive order's state.
    Returns:
      This drive order's state.

  - ### withState

    public DriveOrder withState​(@Nonnull DriveOrder.State state)
    Creates a copy of this object, with the given state.
    Parameters:
      `state` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### toString

    public java.lang.String toString()
    Overrides:
      `toString` in class `java.lang.Object`