Package org.opentcs.data.model
Class Block
- All Implemented Interfaces:
Serializable
An aggregation of resources with distinct usage rules depending on the block's type.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Contains information regarding the grahical representation of a block.static enum
Describes the types of blocks in a driving course. -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the information regarding the grahical representation of this block.Returns an unmodifiable set of all members of this block.getType()
Retruns the type of this block.withHistory
(ObjectHistory history) Creates a copy of this object, with the given history.Creates a copy of this object, with the given history entry integrated.withLayout
(Block.Layout layout) Creates a copy of this object, with the given layout.withMembers
(Set<TCSResourceReference<?>> members) Creates a copy of this object, with the given members.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, with the given property integrated.withType
(Block.Type type) Creates a copy of this object, with the given type.Methods inherited from class org.opentcs.data.model.TCSResource
getReference
Methods inherited from class org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Constructor Details
-
Block
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.
-