Package org.opentcs.access.to.model
Class VehicleCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.VehicleCreationTO
- All Implemented Interfaces:
Serializable
A transfer object describing a block in the plant model.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains information regarding the energy level threshold values of a vehicle.static classContains information regarding the graphical representation of a vehicle. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the vehicle's current bounding box (in mm).intDeprecated.intDeprecated.UsegetEnergyLevelThresholdSet()instead.intDeprecated.UsegetEnergyLevelThresholdSet()instead.intDeprecated.UsegetEnergyLevelThresholdSet()instead.Returns this vehicle's energy level threshold set.Returns the key for selecting the envelope to be used for resources the vehicle occupies.Returns the information regarding the graphical representation of this vehicle.intDeprecated.UsegetBoundingBox()instead.intinttoString()withBoundingBox(BoundingBoxCreationTO boundingBox) Creates a copy of this object, with the given bounding box (in mm).withEnergyLevelCritical(int energyLevelCritical) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.withEnergyLevelFullyRecharged(int energyLevelFullyRecharged) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.withEnergyLevelGood(int energyLevelGood) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.withEnergyLevelSufficientlyRecharged(int energyLevelSufficientlyRecharged) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.withEnergyLevelThresholdSet(VehicleCreationTO.EnergyLevelThresholdSet energyLevelThresholdSet) Creates a copy of this object, with the given EnergyLevelThresholdSet.withEnvelopeKey(String envelopeKey) Creates a copy of this object, with the given envelope key.withLayout(VehicleCreationTO.Layout layout) Creates a copy of this object, with the given layout.withLength(int length) Deprecated.UsewithBoundingBox(BoundingBoxCreationTO)instead.withMaxReverseVelocity(int maxReverseVelocity) Creates a copy of this object with the given maximum reverse velocity (in mm/s).withMaxVelocity(int maxVelocity) Creates a copy of this object with the given maximum velocity (in mm/s).Creates a copy of this object with the given name.withProperties(Map<String, String> properties) Creates a copy of this object with the given properties.withProperty(String key, String value) Creates a copy of this object and adds the given property.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
VehicleCreationTO
Creates a new instance.- Parameters:
name- The name of this vehicle.
-
-
Method Details
-
withName
Creates a copy of this object with the given name.- Overrides:
withNamein classCreationTO- Parameters:
name- The new instance.- Returns:
- A copy of this object, differing in the given name.
-
withProperties
Creates a copy of this object with the given properties.- Overrides:
withPropertiesin classCreationTO- Parameters:
properties- The new properties.- Returns:
- A copy of this object, differing in the given properties.
-
withProperty
Creates a copy of this object and adds the given property. If value == null, then the key-value pair is removed from the properties.- Overrides:
withPropertyin classCreationTO- Parameters:
key- the key.value- the value- Returns:
- A copy of this object that either includes the given entry in its current properties, if value != null or excludes the entry otherwise.
-
getBoundingBox
Returns the vehicle's current bounding box (in mm).- Returns:
- The vehicle's current bounding box (in mm).
-
withBoundingBox
Creates a copy of this object, with the given bounding box (in mm).- Parameters:
boundingBox- The new bounding box.- Returns:
- A copy of this object, differing in the given vehicle bounding box.
-
getLength
Deprecated.UsegetBoundingBox()instead.Returns the vehicle's length (in mm).- Returns:
- The vehicle's length (in mm).
-
withLength
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public VehicleCreationTO withLength(int length) Deprecated.UsewithBoundingBox(BoundingBoxCreationTO)instead.Creates a copy of this object with the vehicle's given length (in mm).- Parameters:
length- The new length. Must be at least 1.- Returns:
- A copy of this object, differing in the given vehicle length.
-
getEnergyLevelCritical
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelCritical()Deprecated.UsegetEnergyLevelThresholdSet()instead.Returns this vehicle's critical energy level (in percent of the maximum). The critical energy level is the one at/below which the vehicle should be recharged.- Returns:
- This vehicle's critical energy level.
-
withEnergyLevelCritical
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public VehicleCreationTO withEnergyLevelCritical(int energyLevelCritical) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.Creates a copy of this object with the given critical energy level. The critical energy level is the one at/below which the vehicle should be recharged.- Parameters:
energyLevelCritical- The new critical energy level. Must not be smaller than 0 or greater than 100.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelGood
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelGood()Deprecated.UsegetEnergyLevelThresholdSet()instead.Returns this vehicle's good energy level (in percent of the maximum). The good energy level is the one at/above which the vehicle can be dispatched again when charging.- Returns:
- This vehicle's good energy level.
-
withEnergyLevelGood
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public VehicleCreationTO withEnergyLevelGood(int energyLevelGood) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.Creates a copy of this object with the vehicle's good energy level (in percent of the maximum). The good energy level is the one at/above which the vehicle can be dispatched again when charging.- Parameters:
energyLevelGood- The new good energy level. Must not be smaller than 0 or greater than 100.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelFullyRecharged
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelFullyRecharged()Deprecated.UsegetEnergyLevelThresholdSet()instead.Returns this vehicle's fully recharged energy level (in percent of the maximum).- Returns:
- This vehicle's fully recharged energy level.
-
withEnergyLevelFullyRecharged
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public VehicleCreationTO withEnergyLevelFullyRecharged(int energyLevelFullyRecharged) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.Creates a copy of this object with the vehicle's fully recharged energy level (in percent of the maximum).- Parameters:
energyLevelFullyRecharged- The new fully recharged energy level. Must not be smaller than 0 or greater than 100.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelSufficientlyRecharged
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public int getEnergyLevelSufficientlyRecharged()Deprecated.UsegetEnergyLevelThresholdSet()instead.Returns this vehicle's sufficiently recharged energy level (in percent of the maximum).- Returns:
- This vehicle's sufficiently recharged energy level.
-
withEnergyLevelSufficientlyRecharged
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public VehicleCreationTO withEnergyLevelSufficientlyRecharged(int energyLevelSufficientlyRecharged) Deprecated.UsewithEnergyLevelThresholdSet(EnergyLevelThresholdSet)instead.Creates a copy of this object with the vehicle's sufficiently recharged energy level (in percent of the maximum).- Parameters:
energyLevelSufficientlyRecharged- The new sufficiently recharged energy level. Must not be smaller than 0 or greater than 100.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelThresholdSet
Returns this vehicle's energy level threshold set.- Returns:
- This vehicle's energy level threshold set.
-
withEnergyLevelThresholdSet
public VehicleCreationTO withEnergyLevelThresholdSet(@Nonnull VehicleCreationTO.EnergyLevelThresholdSet energyLevelThresholdSet) Creates a copy of this object, with the given EnergyLevelThresholdSet.- Parameters:
energyLevelThresholdSet- The new EnergyLevelThresholdSet.- Returns:
- A copy of this object, differing in the given value.
-
getMaxVelocity
public int getMaxVelocity() -
withMaxVelocity
Creates a copy of this object with the given maximum velocity (in mm/s).- Parameters:
maxVelocity- the new max velocity.- Returns:
- A copy of this object, differing in the given value.
-
getMaxReverseVelocity
public int getMaxReverseVelocity() -
withMaxReverseVelocity
Creates a copy of this object with the given maximum reverse velocity (in mm/s).- Parameters:
maxReverseVelocity- the new maximum reverse velocity.- Returns:
- A copy of this object, differing in the given value.
-
getEnvelopeKey
@ScheduledApiChange(when="7.0", details="Envelope key will become non-null.") @Nullable public String getEnvelopeKey()Returns the key for selecting the envelope to be used for resources the vehicle occupies.- Returns:
- The key for selecting the envelope to be used for resources the vehicle occupies.
-
withEnvelopeKey
@ScheduledApiChange(when="7.0", details="Envelope key will become non-null.") public VehicleCreationTO withEnvelopeKey(@Nullable String envelopeKey) Creates a copy of this object, with the given envelope key.- Parameters:
envelopeKey- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getLayout
Returns the information regarding the graphical representation of this vehicle.- Returns:
- The information regarding the graphical representation of this vehicle.
-
withLayout
Creates a copy of this object, with the given layout.- Parameters:
layout- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
toString
-
getEnergyLevelThresholdSet()instead.