Package org.opentcs.drivers.vehicle
Klasse MovementCommand
java.lang.Object
org.opentcs.drivers.vehicle.MovementCommand
A command for moving a step.
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final String
A constant indicating the vehicle should basically just move to a point without a location associated to it.static final String
A constant indicating there is no operation to be executed after moving.static final String
A constant for parking the vehicle. -
Konstruktorübersicht
KonstruktorBeschreibungMovementCommand
(TransportOrder transportOrder, DriveOrder driveOrder, Route.Step step, String operation, Location opLocation, boolean finalMovement, Location finalDestinationLocation, Point finalDestination, String finalOperation, Map<String, String> properties) Creates a new instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
boolean
equalsInMovement
(MovementCommand command) Compares the given movement command to this movement command, ignoring rerouting-related properties.Returns the drive order this movement belongs to.Returns the final destination of the drive order this MovementCommand was created for.Returns the destination location of the whole drive order.Returns the operation to be executed at the final destination position.Returns the operation to be executed after moving.Returns the location at which the operation is to be executed.Returns the properties of the order this command is part of.getStep()
Returns the step describing the movement.Returns the transport order this movement belongs to.boolean
Indicates whether an operation is to be executed in addition to moving or not.int
hashCode()
boolean
Indicates whether this movement is the final one in the driver order it belongs to.toString()
withDriveOrder
(DriveOrder driveOrder) Creates a copy of this object, with the given drive order.withFinalDestination
(Point finalDestination) Creates a copy of this object, with the given final destination.withFinalDestinationLocation
(Location finalDestinationLocation) Creates a copy of this object, with the given final destination location.withFinalMovement
(boolean finalMovement) Creates a copy of this object, with the given final movement flag.withFinalOperation
(String finalOperation) Creates a copy of this object, with the given final operation.withOperation
(String operation) Creates a copy of this object, with the given operation.withOpLocation
(Location opLocation) Creates a copy of this object, with the given location at which the operation is to be executed.withProperties
(Map<String, String> properties) Creates a copy of this object, with the given properties.withStep
(Route.Step step) Creates a copy of this object, with the given step.withTransportOrder
(TransportOrder transportOrder) Creates a copy of this object, with the given transport order.
-
Felddetails
-
NO_OPERATION
A constant indicating there is no operation to be executed after moving.- Siehe auch:
-
MOVE_OPERATION
A constant indicating the vehicle should basically just move to a point without a location associated to it.- Siehe auch:
-
PARK_OPERATION
A constant for parking the vehicle. (Again, basically doing nothing at the destination.)- Siehe auch:
-
-
Konstruktordetails
-
MovementCommand
public MovementCommand(@Nonnull TransportOrder transportOrder, @Nonnull DriveOrder driveOrder, @Nonnull Route.Step step, @Nonnull String operation, @Nullable Location opLocation, boolean finalMovement, @Nullable Location finalDestinationLocation, @Nonnull Point finalDestination, @Nonnull String finalOperation, @Nonnull Map<String, String> properties) Creates a new instance.- Parameter:
transportOrder
- The transport order this movement belongs to.driveOrder
- The drive order this movement belongs to.step
- The step describing the movement.operation
- The operation to be executed after moving.opLocation
- The location at which the operation is to be executed. May benull
if the movement command's operation is considred an empty operation (i.e. isNO_OPERATION
,MOVE_OPERATION
orPARK_OPERATION
).finalMovement
- Indicates whether this movement is the final one in the drive order it belongs to.finalDestinationLocation
- The destination location of the whole drive order.finalDestination
- The destination position of the whole drive order.finalOperation
- The operation to be executed at the destination position.properties
- Properties of the order this command is part of.
-
-
Methodendetails
-
getTransportOrder
Returns the transport order this movement belongs to.- Gibt zurück:
- The transport order this movement belongs to.
-
withTransportOrder
Creates a copy of this object, with the given transport order.- Parameter:
transportOrder
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getDriveOrder
Returns the drive order this movement belongs to.- Gibt zurück:
- The drive order this movement belongs to.
-
withDriveOrder
Creates a copy of this object, with the given drive order.- Parameter:
driveOrder
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getStep
Returns the step describing the movement.- Gibt zurück:
- The step describing the movement.
-
withStep
Creates a copy of this object, with the given step.- Parameter:
step
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getOperation
Returns the operation to be executed after moving.- Gibt zurück:
- The operation to be executed after moving.
-
withOperation
Creates a copy of this object, with the given operation.- Parameter:
operation
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
hasEmptyOperation
public boolean hasEmptyOperation()Indicates whether an operation is to be executed in addition to moving or not.- Gibt zurück:
true
if, and only if, no operation is to be executed.
-
getOpLocation
Returns the location at which the operation is to be executed.May be
null
if the movement command's operation is considred an empty operation (i.e. isNO_OPERATION
,MOVE_OPERATION
orPARK_OPERATION
).- Gibt zurück:
- The location at which the operation is to be executed.
-
withOpLocation
Creates a copy of this object, with the given location at which the operation is to be executed.May be
null
if the movement command's operation is considred an empty operation (i.e. isNO_OPERATION
,MOVE_OPERATION
orPARK_OPERATION
).- Parameter:
opLocation
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
isFinalMovement
public boolean isFinalMovement()Indicates whether this movement is the final one in the driver order it belongs to.- Gibt zurück:
true
if, and only if, this movement is the final one.
-
withFinalMovement
Creates a copy of this object, with the given final movement flag.- Parameter:
finalMovement
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getFinalDestination
Returns the final destination of the drive order this MovementCommand was created for.- Gibt zurück:
- The final destination of the drive order this MovementCommand was created for.
-
withFinalDestination
Creates a copy of this object, with the given final destination.- Parameter:
finalDestination
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getFinalDestinationLocation
Returns the destination location of the whole drive order.- Gibt zurück:
- The destination location of the whole drive order.
-
withFinalDestinationLocation
Creates a copy of this object, with the given final destination location.- Parameter:
finalDestinationLocation
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getFinalOperation
Returns the operation to be executed at the final destination position.- Gibt zurück:
- The operation to be executed at the final destination position.
-
withFinalOperation
Creates a copy of this object, with the given final operation.- Parameter:
finalOperation
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
getProperties
Returns the properties of the order this command is part of.- Gibt zurück:
- The properties of the order this command is part of.
-
withProperties
Creates a copy of this object, with the given properties.- Parameter:
properties
- The value to be set in the copy.- Gibt zurück:
- A copy of this object, differing in the given value.
-
equals
-
equalsInMovement
Compares the given movement command to this movement command, ignoring rerouting-related properties.- Parameter:
command
- The movement command to compare to.- Gibt zurück:
true
, if the given movement command is equal to this movement command (ignoring rerouting-related properties), otherwisefalse
.
-
hashCode
public int hashCode() -
toString
-