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:
  `java.io.Serializable`

    public class VehicleCreationTO
    extends CreationTO
    implements java.io.Serializable

A transfer object describing a block in the plant model.

See Also:
  Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `VehicleCreationTO.Layout` | Contains information regarding the grahical representation of a vehicle.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `VehicleCreationTO​(java.lang.String name)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `int` | `getEnergyLevelCritical()` | Returns this vehicle's critical energy level (in percent of the maximum).
  `int` | `getEnergyLevelFullyRecharged()` | Returns this vehicle's fully recharged energy level (in percent of the maximum).
  `int` | `getEnergyLevelGood()` | Returns this vehicle's good energy level (in percent of the maximum).
  `int` | `getEnergyLevelSufficientlyRecharged()` | Returns this vehicle's sufficiently recharged energy level (in percent of the maximum).
  `VehicleCreationTO.Layout` | `getLayout()` | Returns the information regarding the grahical representation of this vehicle.
  `int` | `getLength()` | Returns the vehicle's length (in mm).
  `int` | `getMaxReverseVelocity()` |
  `int` | `getMaxVelocity()` |
  `java.lang.String` | `toString()` |
  `VehicleCreationTO` | `withEnergyLevelCritical​(int energyLevelCritical)` | Creates a copy of this object with the given critical energy level.
  `VehicleCreationTO` | `withEnergyLevelFullyRecharged​(int energyLevelFullyRecharged)` | Creates a copy of this object with the vehicle's fully recharged energy level (in percent of the maximum).
  `VehicleCreationTO` | `withEnergyLevelGood​(int energyLevelGood)` | Creates a copy of this object with the vehicle's good energy level (in percent of the maximum).
  `VehicleCreationTO` | `withEnergyLevelSufficientlyRecharged​(int energyLevelSufficientlyRecharged)` | Creates a copy of this object with the vehicle's sufficiently recharged energy level (in percent of the maximum).
  `VehicleCreationTO` | `withLayout​(VehicleCreationTO.Layout layout)` | Creates a copy of this object, with the given layout.
  `VehicleCreationTO` | `withLength​(int length)` | Creates a copy of this object with the vehicle's given length (in mm).
  `VehicleCreationTO` | `withMaxReverseVelocity​(int maxReverseVelocity)` | Creates a copy of this object with the given maximum reverse velocity (in mm/s).
  `VehicleCreationTO` | `withMaxVelocity​(int maxVelocity)` | Creates a copy of this object with the given maximum velocity (in mm/s).
  `VehicleCreationTO` | `withName​(java.lang.String name)` | Creates a copy of this object with the given name.
  `VehicleCreationTO` | `withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)` | Creates a copy of this object with the given properties.
  `VehicleCreationTO` | `withProperty​(java.lang.String key, java.lang.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`

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

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

- ## Constructor Details

  - ### VehicleCreationTO

    public VehicleCreationTO​(@Nonnull java.lang.String name)
    Creates a new instance.
    Parameters:
      `name` - The name of this vehicle.

- ## Method Details

  - ### withName

    public VehicleCreationTO withName​(@Nonnull java.lang.String name)
    Creates a copy of this object with the given name.
    Overrides:
      `withName` in class `CreationTO`
    Parameters:
      `name` - The new instance.
    Returns:
      A copy of this object, differing in the given name.

  - ### withProperties

    public VehicleCreationTO withProperties​(@Nonnull java.util.Map<java.lang.String,​java.lang.String> properties)
    Creates a copy of this object with the given properties.
    Overrides:
      `withProperties` in class `CreationTO`
    Parameters:
      `properties` - The new properties.
    Returns:
      A copy of this object, differing in the given properties.

  - ### withProperty

    public VehicleCreationTO withProperty​(@Nonnull java.lang.String key, @Nonnull java.lang.String value)
    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:
      `withProperty` in class `CreationTO`
    Parameters:
      `key` - the key.
      `value` - the value
    Returns:
      A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.

  - ### getLength

    public int getLength()
    Returns the vehicle's length (in mm).
    Returns:
      The vehicle's length (in mm).

  - ### withLength

    public VehicleCreationTO withLength​(int length)
    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

    public int getEnergyLevelCritical()
    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

    public VehicleCreationTO withEnergyLevelCritical​(int energyLevelCritical)
    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

    public int getEnergyLevelGood()
    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

    public VehicleCreationTO withEnergyLevelGood​(int energyLevelGood)
    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

    public int getEnergyLevelFullyRecharged()
    Returns this vehicle's fully recharged energy level (in percent of the maximum).
    Returns:
      This vehicle's fully recharged energy level.

  - ### withEnergyLevelFullyRecharged

    public VehicleCreationTO withEnergyLevelFullyRecharged​(int energyLevelFullyRecharged)
    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

    public int getEnergyLevelSufficientlyRecharged()
    Returns this vehicle's sufficiently recharged energy level (in percent of the maximum).
    Returns:
      This vehicle's sufficiently recharged energy level.

  - ### withEnergyLevelSufficientlyRecharged

    public VehicleCreationTO withEnergyLevelSufficientlyRecharged​(int energyLevelSufficientlyRecharged)
    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.

  - ### getMaxVelocity

    public int getMaxVelocity()

  - ### withMaxVelocity

    public VehicleCreationTO withMaxVelocity​(int maxVelocity)
    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

    public VehicleCreationTO withMaxReverseVelocity​(int maxReverseVelocity)
    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.

  - ### getLayout

    public VehicleCreationTO.Layout getLayout()
    Returns the information regarding the grahical representation of this vehicle.
    Returns:
      The information regarding the grahical representation of this vehicle.

  - ### withLayout

    public VehicleCreationTO withLayout​(VehicleCreationTO.Layout layout)
    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

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