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 class
Block.Layout
Contains information regarding the grahical representation of a block.static class
Block.Type
Describes 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.Layout
getLayout()
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.Type
getType()
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.Block
withLayout(Block.Layout layout)
Creates a copy of this object, with the given layout.Block
withMembers(java.util.Set<TCSResourceReference<?>> members)
Creates a copy of this object, with the given members.Block
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object, with the given properties.Block
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object, with the given property integrated.Block
withType(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:TCSObject
Creates a copy of this object, with the given property integrated.- Specified by:
withProperty
in 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:TCSObject
Creates a copy of this object, with the given properties.- Specified by:
withProperties
in classTCSObject<Block>
- 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<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:TCSObject
Creates a copy of this object, with the given history.- Specified by:
withHistory
in 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.
-