Package org.opentcs.data.model
Class LocationType
java.lang.Object
- 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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocationType.Layout
Contains information regarding the grahical representation of a location type. -
Field Summary
-
Constructor Summary
Constructors Constructor Description LocationType(java.lang.String name)
Creates a new LocationType. -
Method Summary
Modifier and Type Method Description java.util.List<java.lang.String>
getAllowedOperations()
Returns a set of operations allowed with locations of this type.java.util.List<java.lang.String>
getAllowedPeripheralOperations()
Returns a set of peripheral operations allowed with locations of this type.LocationType.Layout
getLayout()
Returns the information regarding the grahical representation of this location type.boolean
isAllowedOperation(java.lang.String operation)
Checks if a given operation is allowed with locations of this type.LocationType
withAllowedOperations(java.util.List<java.lang.String> allowedOperations)
Creates a copy of this object, with the given allowed operations.LocationType
withAllowedPeripheralOperations(java.util.List<java.lang.String> allowedPeripheralOperations)
Creates a copy of this object, with the given allowed peripheral operations.TCSObject<LocationType>
withHistory(ObjectHistory history)
Creates a copy of this object, with the given history.TCSObject<LocationType>
withHistoryEntry(ObjectHistory.Entry entry)
Creates a copy of this object, with the given history entry integrated.LocationType
withLayout(LocationType.Layout layout)
Creates a copy of this object, with the given layout.LocationType
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object, with the given properties.LocationType
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object, with the given property integrated.Methods inherited from class org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, getReference, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Constructor Details
-
LocationType
public LocationType(java.lang.String name)Creates a new LocationType.- Parameters:
name
- The new location type's name.
-
-
Method Details
-
withProperty
Description copied from class:TCSObject
Creates a copy of this object, with the given property integrated.- Specified by:
withProperty
in classTCSObject<LocationType>
- Parameters:
key
- The key of the property to be changed.value
- The new value of the property, ornull
, if the property is to be removed.- Returns:
- A copy of this object, with the given property integrated.
-
withProperties
Description copied from class:TCSObject
Creates a copy of this object, with the given properties.- Specified by:
withProperties
in classTCSObject<LocationType>
- Parameters:
properties
- The properties.- Returns:
- A copy of this object, with the given properties.
-
withHistoryEntry
Description copied from class:TCSObject
Creates a copy of this object, with the given history entry integrated.- Specified by:
withHistoryEntry
in classTCSObject<LocationType>
- Parameters:
entry
- The history entry to be integrated.- Returns:
- A copy of this object, with the given history entry integrated.
-
withHistory
Description copied from class:TCSObject
Creates a copy of this object, with the given history.- Specified by:
withHistory
in classTCSObject<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
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 java.util.List<java.lang.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(java.util.List<java.lang.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
Returns the information regarding the grahical representation of this location type.- Returns:
- The information regarding the grahical representation of this location type.
-
withLayout
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.
-