Class Location

java.lang.Object
All Implemented Interfaces:
java.io.Serializable

public class Location
extends TCSResource<Location>
implements java.io.Serializable
A location at which a Vehicle may perform an action.

A location must be linked to at least one Point to be reachable for a vehicle. It may be linked to multiple points. As long as a link's specific set of allowed operations is empty (which is the default), all operations defined by the location's referenced LocationType are allowed at the linked point. If the link's set of allowed operations is not empty, only the operations contained in it are allowed at the linked point.

See Also:
LocationType, Serialized Form
  • Constructor Details

    • Location

      public Location​(java.lang.String name, TCSObjectReference<LocationType> type)
      Creates a new Location.
      Parameters:
      name - The new location's name.
      type - The new location's type.
  • Method Details

    • withProperty

      public Location withProperty​(java.lang.String key, java.lang.String value)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given property integrated.
      Specified by:
      withProperty in class TCSObject<Location>
      Parameters:
      key - The key of the property to be changed.
      value - The new value of the property, or null, if the property is to be removed.
      Returns:
      A copy of this object, with the given property integrated.
    • withProperties

      public Location withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given properties.
      Specified by:
      withProperties in class TCSObject<Location>
      Parameters:
      properties - The properties.
      Returns:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TCSObject<Location> withHistoryEntry​(ObjectHistory.Entry entry)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history entry integrated.
      Specified by:
      withHistoryEntry in class TCSObject<Location>
      Parameters:
      entry - The history entry to be integrated.
      Returns:
      A copy of this object, with the given history entry integrated.
    • withHistory

      public TCSObject<Location> withHistory​(ObjectHistory history)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history.
      Specified by:
      withHistory in class TCSObject<Location>
      Parameters:
      history - The history.
      Returns:
      A copy of this object, with the given history.
    • getPosition

      public Triple getPosition()
      Returns the physical coordinates of this location in mm.
      Returns:
      The physical coordinates of this location in mm.
    • withPosition

      public Location withPosition​(Triple position)
      Creates a copy of this object, with the given position.
      Parameters:
      position - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getType

      public TCSObjectReference<LocationType> getType()
      Returns a reference to the type of this location.
      Returns:
      A reference to the type of this location.
    • getAttachedLinks

      public java.util.Set<Location.Link> getAttachedLinks()
      Returns a set of links attached to this location.
      Returns:
      A set of links attached to this location.
    • withAttachedLinks

      public Location withAttachedLinks​(@Nonnull java.util.Set<Location.Link> attachedLinks)
      Creates a copy of this object, with the given attached links.
      Parameters:
      attachedLinks - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.