Class LocationType

java.lang.Object
org.opentcs.data.TCSObject<LocationType>
org.opentcs.data.model.LocationType
All Implemented Interfaces:
Serializable

public class LocationType extends TCSObject<LocationType> implements Serializable
Describes the type of a Location.
See Also:
  • Constructor Details

    • LocationType

      public LocationType(String name)
      Creates a new LocationType.
      Parameters:
      name - The new location type's name.
  • Method Details

    • withProperty

      public LocationType withProperty(String key, String value)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given property integrated.
      Specified by:
      withProperty in class TCSObject<LocationType>
      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 LocationType withProperties(Map<String,String> properties)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given properties.
      Specified by:
      withProperties in class TCSObject<LocationType>
      Parameters:
      properties - The properties.
      Returns:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TCSObject<LocationType> 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<LocationType>
      Parameters:
      entry - The history entry to be integrated.
      Returns:
      A copy of this object, with the given history entry integrated.
    • withHistory

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

      public List<String> getAllowedOperations()
      Returns a set of operations allowed with locations of this type.
      Returns:
      A set of operations allowed with locations of this type.
    • isAllowedOperation

      public boolean isAllowedOperation(String operation)
      Checks if a given operation is allowed with locations of this type.
      Parameters:
      operation - The operation to be checked for.
      Returns:
      true if, and only if, the given operation is allowed with locations of this type.
    • withAllowedOperations

      public LocationType withAllowedOperations(List<String> allowedOperations)
      Creates a copy of this object, with the given allowed operations.
      Parameters:
      allowedOperations - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getAllowedPeripheralOperations

      public List<String> getAllowedPeripheralOperations()
      Returns a set of peripheral operations allowed with locations of this type.
      Returns:
      A set of peripheral operations allowed with locations of this type.
    • withAllowedPeripheralOperations

      public LocationType withAllowedPeripheralOperations(List<String> allowedPeripheralOperations)
      Creates a copy of this object, with the given allowed peripheral operations.
      Parameters:
      allowedPeripheralOperations - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getLayout

      public LocationType.Layout getLayout()
      Returns the information regarding the grahical representation of this location type.
      Returns:
      The information regarding the grahical representation of this location type.
    • withLayout

      public LocationType withLayout(LocationType.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.