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:
java.io.Serializable
public class BlockCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing a block in the plant model.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockCreationTO.LayoutContains information regarding the grahical representation of a block. -
Constructor Summary
Constructors Constructor Description BlockCreationTO(java.lang.String name)Creates a new instance. -
Method Summary
Modifier and Type Method Description BlockCreationTO.LayoutgetLayout()Returns the information regarding the grahical representation of this block.java.util.Set<java.lang.String>getMemberNames()Returns the names of this block's members.Block.TypegetType()Returns the type of this block.java.lang.StringtoString()BlockCreationTOwithLayout(BlockCreationTO.Layout layout)Creates a copy of this object, with the given layout.BlockCreationTOwithMemberNames(java.util.Set<java.lang.String> memberNames)Creates a copy of this object with the given members.BlockCreationTOwithName(java.lang.String name)Creates a copy of this object with the given name.BlockCreationTOwithProperties(java.util.Map<java.lang.String,java.lang.String> properties)Creates a copy of this object with the given properties.BlockCreationTOwithProperty(java.lang.String key, java.lang.String value)Creates a copy of this object and adds the given property.BlockCreationTOwithType(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
public BlockCreationTO(java.lang.String name)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:
withNamein classCreationTO- Parameters:
name- The new name.- Returns:
- A copy of this object, differing in the given name.
-
withProperties
public BlockCreationTO withProperties(@Nonnull java.util.Map<java.lang.String,java.lang.String> properties)Creates a copy of this object with the given properties.- Overrides:
withPropertiesin classCreationTO- Parameters:
properties- The new properties.- Returns:
- A copy of this object, differing in the given properties.
-
withProperty
public BlockCreationTO 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:
withPropertyin 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
@Nonnull public java.util.Set<java.lang.String> 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
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-