Class LocationType

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

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

    • LocationType

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

    • withProperty

      public LocationType 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<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​(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<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 java.util.List<java.lang.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​(java.lang.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​(java.util.List<java.lang.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.