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 class` | `BlockCreationTO.Layout` | Contains 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.Layout` | `getLayout()` | 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.Type` | `getType()` | Returns the type of this block.
  `java.lang.String` | `toString()` |
  `BlockCreationTO` | `withLayout​(BlockCreationTO.Layout layout)` | Creates a copy of this object, with the given layout.
  `BlockCreationTO` | `withMemberNames​(java.util.Set<java.lang.String> memberNames)` | Creates a copy of this object with the given members.
  `BlockCreationTO` | `withName​(java.lang.String name)` | Creates a copy of this object with the given name.
  `BlockCreationTO` | `withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)` | Creates a copy of this object with the given properties.
  `BlockCreationTO` | `withProperty​(java.lang.String key, java.lang.String value)` | Creates a copy of this object and adds the given property.
  `BlockCreationTO` | `withType​(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`

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

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

- ## Constructor Details

  - ### BlockCreationTO

    public BlockCreationTO​(java.lang.String name)
    Creates a new instance.
    Parameters:
      `name` - The name of this block.

- ## Method Details

  - ### withName

    public BlockCreationTO withName​(@Nonnull java.lang.String name)
    Creates a copy of this object with the given name.
    Overrides:
      `withName` in class `CreationTO`
    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:
      `withProperties` in class `CreationTO`
    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:
      `withProperty` in class `CreationTO`
    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

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

  - ### withType

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

    public BlockCreationTO withMemberNames​(@Nonnull java.util.Set<java.lang.String> memberNames)
    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

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

  - ### withLayout

    public BlockCreationTO withLayout​(BlockCreationTO.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.

  - ### toString

    public java.lang.String toString()
    Overrides:
      `toString` in class `java.lang.Object`