Package org.opentcs.access.to.model
Class BlockCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.BlockCreationTO
- All Implemented Interfaces:
Serializable
A transfer object describing a block in the plant model.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Contains information regarding the grahical representation of a block. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the information regarding the grahical representation of this block.Returns the names of this block's members.getType()
Returns the type of this block.toString()
withLayout
(BlockCreationTO.Layout layout) Creates a copy of this object, with the given layout.withMemberNames
(Set<String> memberNames) Creates a copy of this object with the given members.Creates a copy of this object with the given name.withProperties
(Map<String, String> properties) Creates a copy of this object with the given properties.withProperty
(String key, String value) Creates a copy of this object and adds the given property.withType
(Block.Type type) Creates a copy of this object with the given type.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
BlockCreationTO
Creates a new instance.- Parameters:
name
- The name of this block.
-
-
Method Details
-
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
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
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.
-
getType
Returns the type of this block.- Returns:
- The type of this block.
-
withType
Creates a copy of this object with the given type.- Parameters:
type
- The new type.- Returns:
- A copy of this object, differing in the given type.
-
getMemberNames
Returns the names of this block's members.- Returns:
- The names of this block's members.
-
withMemberNames
Creates a copy of this object with the given members.- Parameters:
memberNames
- The names of the block's members.- Returns:
- A copy of this object, differing in the given value.
-
getLayout
Returns the information regarding the grahical representation of this block.- Returns:
- The information regarding the grahical representation of this block.
-
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.
-
toString
-