Package org.opentcs.data.model
Class Block
java.lang.Object
- All Implemented Interfaces:
java.io.Serializable
public class Block extends TCSResource<Block> implements java.io.Serializable
An aggregation of resources with distinct usage rules depending on the block's type.
- See Also:
TCSResource, Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlock.LayoutContains information regarding the grahical representation of a block.static classBlock.TypeDescribes the types of blocks in a driving course. -
Field Summary
-
Constructor Summary
Constructors Constructor Description Block(java.lang.String name)Creates an empty block. -
Method Summary
Modifier and Type Method Description Block.LayoutgetLayout()Returns the information regarding the grahical representation of this block.java.util.Set<TCSResourceReference<?>>getMembers()Returns an unmodifiable set of all members of this block.Block.TypegetType()Retruns the type of this block.TCSObject<Block>withHistory(ObjectHistory history)Creates a copy of this object, with the given history.TCSObject<Block>withHistoryEntry(ObjectHistory.Entry entry)Creates a copy of this object, with the given history entry integrated.BlockwithLayout(Block.Layout layout)Creates a copy of this object, with the given layout.BlockwithMembers(java.util.Set<TCSResourceReference<?>> members)Creates a copy of this object, with the given members.BlockwithProperties(java.util.Map<java.lang.String,java.lang.String> properties)Creates a copy of this object, with the given properties.BlockwithProperty(java.lang.String key, java.lang.String value)Creates a copy of this object, with the given property integrated.BlockwithType(Block.Type type)Creates a copy of this object, with the given type.Methods inherited from class org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Constructor Details
-
Block
public Block(java.lang.String name)Creates an empty block.- Parameters:
name- This block's name.
-
-
Method Details
-
withProperty
Description copied from class:TCSObjectCreates a copy of this object, with the given property integrated.- Specified by:
withPropertyin classTCSObject<Block>- 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:TCSObjectCreates a copy of this object, with the given properties.- Specified by:
withPropertiesin classTCSObject<Block>- Parameters:
properties- The properties.- Returns:
- A copy of this object, with the given properties.
-
withHistoryEntry
Description copied from class:TCSObjectCreates a copy of this object, with the given history entry integrated.- Specified by:
withHistoryEntryin classTCSObject<Block>- 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:TCSObjectCreates a copy of this object, with the given history.- Specified by:
withHistoryin classTCSObject<Block>- Parameters:
history- The history.- Returns:
- A copy of this object, with the given history.
-
getType
Retruns 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 value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getMembers
Returns an unmodifiable set of all members of this block.- Returns:
- An unmodifiable set of all members of this block.
-
withMembers
Creates a copy of this object, with the given members.- Parameters:
members- 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 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.
-