Class ModelLayoutElementCreationTO

java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.ModelLayoutElementCreationTO
All Implemented Interfaces:
java.io.Serializable

public class ModelLayoutElementCreationTO
extends CreationTO
implements java.io.Serializable
A transfer object describing a model layout element in the visual layout.
See Also:
Serialized Form
  • Constructor Details

    • ModelLayoutElementCreationTO

      public ModelLayoutElementCreationTO​(java.lang.String name)
      Creates a new instance.
      Parameters:
      name - The name of this model layout element.
  • Method Details

    • withName

      public ModelLayoutElementCreationTO 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 ModelLayoutElementCreationTO 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 ModelLayoutElementCreationTO 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.
    • getLayer

      public int getLayer()
      Returns the layer on which this model layout element is to be displayed.
      Returns:
      The layer on which this model layout element is to be displayed.
    • withLayer

      public ModelLayoutElementCreationTO withLayer​(int layer)
      Creates a copy of this object with the given layer on which this model layout element is to be displayed.
      Parameters:
      layer - The new layer
      Returns:
      A copy of this object, differing in the given layer.