Package org.opentcs.access.to.model
Class LocationTypeCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.LocationTypeCreationTO
- All Implemented Interfaces:
java.io.Serializable
public class LocationTypeCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing a location type in the plant model.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description LocationTypeCreationTO(java.lang.String name)
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.util.List<java.lang.String>
getAllowedOperations()
Returns the allowed operations for this location type.LocationTypeCreationTO
withAllowedOperations(java.util.List<java.lang.String> allowedOperations)
Creates a copy of this object with the given allowed operations.LocationTypeCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.LocationTypeCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.LocationTypeCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object and adds the given property.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
LocationTypeCreationTO
public LocationTypeCreationTO(@Nonnull java.lang.String name)Creates a new instance.- Parameters:
name
- The name of this location type.
-
-
Method Details
-
getAllowedOperations
@Nonnull public java.util.List<java.lang.String> getAllowedOperations()Returns the allowed operations for this location type.- Returns:
- The allowed operations for this location type.
-
withAllowedOperations
public LocationTypeCreationTO withAllowedOperations(@Nonnull java.util.List<java.lang.String> allowedOperations)Creates a copy of this object with the given allowed operations.- Parameters:
allowedOperations
- the new allowed operations.- Returns:
- A copy of this object, differing in the given value.
-
withName
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- Parameters:
name
- The new name.- Returns:
- A copy of this object, differing in the given name.
-
withProperties
public LocationTypeCreationTO withProperties(@Nonnull java.util.Map<java.lang.String,java.lang.String> properties)Creates a copy of this object with the given properties.- Overrides:
withProperties
in classCreationTO
- Parameters:
properties
- The new properties.- Returns:
- A copy of this object, differing in the given properties.
-
withProperty
public LocationTypeCreationTO withProperty(@Nonnull java.lang.String key, @Nonnull java.lang.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.- Overrides:
withProperty
in classCreationTO
- Parameters:
key
- the key.value
- the value- Returns:
- A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.
-