Package org.opentcs.data.model

# Class Block

java.lang.Object
org.opentcs.data.TCSObject<E>
org.opentcs.data.model.TCSResource<Block>
org.opentcs.data.model.Block

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

  ### Fields inherited from class org.opentcs.data.TCSObject

  `reference`

- ## 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.model.TCSResource

  `getReference`

  ### Methods inherited from class org.opentcs.data.TCSObject

  `equals, getHistory, getName, getProperties, getProperty, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Block

    public Block​(java.lang.String name)
    Creates an empty block.
    Parameters:
      `name` - This block's name.

- ## Method Details

  - ### withProperty

    public Block withProperty​(java.lang.String key, java.lang.String value)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given property integrated.
    Specified by:
      `withProperty` in class `TCSObject<Block>`
    Parameters:
      `key` - The key of the property to be changed.
      `value` - The new value of the property, or `null`, if the property is to be removed.
    Returns:
      A copy of this object, with the given property integrated.

  - ### withProperties

    public Block withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given properties.
    Specified by:
      `withProperties` in class `TCSObject<Block>`
    Parameters:
      `properties` - The properties.
    Returns:
      A copy of this object, with the given properties.

  - ### withHistoryEntry

    public TCSObject<Block> withHistoryEntry​(ObjectHistory.Entry entry)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history entry integrated.
    Specified by:
      `withHistoryEntry` in class `TCSObject<Block>`
    Parameters:
      `entry` - The history entry to be integrated.
    Returns:
      A copy of this object, with the given history entry integrated.

  - ### withHistory

    public TCSObject<Block> withHistory​(ObjectHistory history)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history.
    Specified by:
      `withHistory` in class `TCSObject<Block>`
    Parameters:
      `history` - The history.
    Returns:
      A copy of this object, with the given history.

  - ### getType

    public Block.Type getType()
    Retruns the type of this block.
    Returns:
      The type of this block.

  - ### withType

    public Block withType​(Block.Type type)
    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

    public java.util.Set<TCSResourceReference<?>> getMembers()
    Returns an unmodifiable set of all members of this block.
    Returns:
      An unmodifiable set of all members of this block.

  - ### withMembers

    public Block withMembers​(java.util.Set<TCSResourceReference<?>> members)
    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

    public Block.Layout getLayout()
    Returns the information regarding the grahical representation of this block.
    Returns:
      The information regarding the grahical representation of this block.

  - ### withLayout

    public Block withLayout​(Block.Layout layout)
    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.