Klasse LocationCreationTO

java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.LocationCreationTO
Alle implementierten Schnittstellen:
Serializable

public class LocationCreationTO extends CreationTO implements Serializable
A transfer object describing a location in a plant model.
Siehe auch:
  • Konstruktordetails

    • LocationCreationTO

      public LocationCreationTO(@Nonnull String name, @Nonnull String typeName, @Nonnull Triple position)
      Creates a new instance.
      Parameter:
      name - The name of this location.
      typeName - The name of this location's type.
      position - The position of this location.
  • Methodendetails

    • withName

      public LocationCreationTO withName(@Nonnull String name)
      Creates a copy of this object with the given name.
      Setzt außer Kraft:
      withName in Klasse CreationTO
      Parameter:
      name - The new name.
      Gibt zurück:
      A copy of this object, differing in the given name.
    • getTypeName

      @Nonnull public String getTypeName()
      Returns the name of this location's type.
      Gibt zurück:
      The name of this location's type.
    • withTypeName

      public LocationCreationTO withTypeName(@Nonnull String typeName)
      Creates a copy of this object with the location's type.
      Parameter:
      typeName - The location type.
      Gibt zurück:
      A copy of this object, differing in the given type.
    • getPosition

      @Nonnull public Triple getPosition()
      Returns the position of this location (in mm).
      Gibt zurück:
      The position of this location (in mm).
    • withPosition

      public LocationCreationTO withPosition(@Nonnull Triple position)
      Creates a copy of this object with the given position (in mm).
      Parameter:
      position - the new position of this location (in mm).
      Gibt zurück:
      A copy of this object, differing in the given position.
    • getLinks

      @Nonnull public Map<String,Set<String>> getLinks()
      Returns the links attaching points to this location. This is a map of point names to allowed operations.
      Gibt zurück:
      The links attaching points to this location.
    • withLinks

      public LocationCreationTO withLinks(@Nonnull Map<String,Set<String>> links)
      Creates a copy of this object with the given links that attach points to this location.
      Parameter:
      links - the new links. This is supposed to be a map of point names to allowed operations.
      Gibt zurück:
      A copy of this object, differing in the given links.
    • withLink

      public LocationCreationTO withLink(@Nonnull String pointName, @Nonnull Set<String> allowedOperations)
      Creates a copy of this object with the given links that attach points to this location.
      Parameter:
      pointName - The name of the point linked to.
      allowedOperations - The operations allowed at the point.
      Gibt zurück:
      A copy of this object, differing in the given link.
    • isLocked

      public boolean isLocked()
      Returns the lock status of this location (i.e. whether it my be used by vehicles or not).
      Gibt zurück:
      true if this location is currently locked (i.e. it may not be used by vehicles), else false.
    • withLocked

      public LocationCreationTO withLocked(boolean locked)
      Creates a copy of this object with the given locked flag.
      Parameter:
      locked - The new locked attribute.
      Gibt zurück:
      A copy of this object, differing in the locked attribute.
    • withProperties

      public LocationCreationTO withProperties(@Nonnull Map<String,String> properties)
      Creates a copy of this object with the given properties.
      Setzt außer Kraft:
      withProperties in Klasse CreationTO
      Parameter:
      properties - The new properties.
      Gibt zurück:
      A copy of this object, differing in the given properties.
    • withProperty

      public LocationCreationTO withProperty(@Nonnull String key, @Nonnull 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.
      Setzt außer Kraft:
      withProperty in Klasse CreationTO
      Parameter:
      key - the key.
      value - the value
      Gibt zurück:
      A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.
    • getLayout

      public LocationCreationTO.Layout getLayout()
      Returns the information regarding the grahical representation of this location.
      Gibt zurück:
      The information regarding the grahical representation of this location.
    • withLayout

      public LocationCreationTO withLayout(LocationCreationTO.Layout layout)
      Creates a copy of this object, with the given layout.
      Parameter:
      layout - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object