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
  • 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