Class PlantModel

java.lang.Object
org.opentcs.data.model.PlantModel
All Implemented Interfaces:
java.io.Serializable

public class PlantModel
extends java.lang.Object
implements java.io.Serializable
An immutable representation of a complete plant model's state.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    PlantModel​(java.lang.String name)
    Creates a new instance.
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<Block> getBlocks()
    Returns the blocks in this plant model.
    java.util.Set<Location> getLocations()
    Returns the locations in this plant model.
    java.util.Set<LocationType> getLocationTypes()
    Returns the location types in this plant model.
    java.lang.String getName()
    Returns the name of the plant model.
    java.util.Set<Path> getPaths()
    Returns the paths in this plant model.
    java.util.Set<Point> getPoints()
    Returns the points in this plant model.
    java.util.Map<java.lang.String,​java.lang.String> getProperties()
    Returns the plant model's properties.
    java.util.Set<Vehicle> getVehicles()
    Returns the vehicles in this plant model.
    java.util.Set<VisualLayout> getVisualLayouts()
    Returns the visual layouts in this plant model.
    java.lang.String toString()  
    PlantModel withBlocks​(java.util.Set<Block> blocks)
    Returns a copy of this plant model, with its blocks replaced by the given ones.
    PlantModel withLocations​(java.util.Set<Location> locations)
    Returns a copy of this plant model, with its locations replaced by the given ones.
    PlantModel withLocationTypes​(java.util.Set<LocationType> locationTypes)
    Returns a copy of this plant model, with its location types replaced by the given ones.
    PlantModel withPaths​(java.util.Set<Path> paths)
    Returns a copy of this plant model, with its paths replaced by the given ones.
    PlantModel withPoints​(java.util.Set<Point> points)
    Returns a copy of this plant model, with its points replaced by the given ones.
    PlantModel withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
    Returns a copy of this plant model, with its properties replaced by the given ones.
    PlantModel withVehicles​(java.util.Set<Vehicle> vehicles)
    Returns a copy of this plant model, with its vehicles replaced by the given ones.
    PlantModel withVisuaLayouts​(java.util.Set<VisualLayout> visualLayouts)
    Deprecated.
    PlantModel withVisualLayouts​(java.util.Set<VisualLayout> visualLayouts)
    Returns a copy of this plant model, with its visual layouts replaced by the given ones.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PlantModel

      public PlantModel​(@Nonnull java.lang.String name)
      Creates a new instance.
      Parameters:
      name - The model's name.
  • Method Details

    • getName

      @Nonnull public java.lang.String getName()
      Returns the name of the plant model.
      Returns:
      The name of the plant model.
    • getProperties

      @Nonnull public java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns the plant model's properties.
      Returns:
      The plant model's properties.
    • withProperties

      public PlantModel withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Returns a copy of this plant model, with its properties replaced by the given ones.
      Parameters:
      properties - The properties.
      Returns:
      A copy of this plant model, with its properties replaced by the given ones.
    • getPoints

      @Nonnull public java.util.Set<Point> getPoints()
      Returns the points in this plant model.
      Returns:
      The points in this plant model.
    • withPoints

      public PlantModel withPoints​(@Nonnull java.util.Set<Point> points)
      Returns a copy of this plant model, with its points replaced by the given ones.
      Parameters:
      points - The points.
      Returns:
      A copy of this plant model, with its points replaced by the given ones.
    • getPaths

      @Nonnull public java.util.Set<Path> getPaths()
      Returns the paths in this plant model.
      Returns:
      The paths in this plant model.
    • withPaths

      public PlantModel withPaths​(@Nonnull java.util.Set<Path> paths)
      Returns a copy of this plant model, with its paths replaced by the given ones.
      Parameters:
      paths - The paths.
      Returns:
      A copy of this plant model, with its paths replaced by the given ones.
    • getLocationTypes

      @Nonnull public java.util.Set<LocationType> getLocationTypes()
      Returns the location types in this plant model.
      Returns:
      The location types in this plant model.
    • withLocationTypes

      public PlantModel withLocationTypes​(@Nonnull java.util.Set<LocationType> locationTypes)
      Returns a copy of this plant model, with its location types replaced by the given ones.
      Parameters:
      locationTypes - The location types.
      Returns:
      A copy of this plant model, with its location types replaced by the given ones.
    • getLocations

      @Nonnull public java.util.Set<Location> getLocations()
      Returns the locations in this plant model.
      Returns:
      The locations in this plant model.
    • withLocations

      public PlantModel withLocations​(@Nonnull java.util.Set<Location> locations)
      Returns a copy of this plant model, with its locations replaced by the given ones.
      Parameters:
      locations - The locations.
      Returns:
      A copy of this plant model, with its locations replaced by the given ones.
    • getBlocks

      @Nonnull public java.util.Set<Block> getBlocks()
      Returns the blocks in this plant model.
      Returns:
      The blocks in this plant model.
    • withBlocks

      public PlantModel withBlocks​(@Nonnull java.util.Set<Block> blocks)
      Returns a copy of this plant model, with its blocks replaced by the given ones.
      Parameters:
      blocks - The blocks.
      Returns:
      A copy of this plant model, with its blocks replaced by the given ones.
    • getVehicles

      @Nonnull public java.util.Set<Vehicle> getVehicles()
      Returns the vehicles in this plant model.
      Returns:
      The vehicles in this plant model.
    • withVehicles

      public PlantModel withVehicles​(@Nonnull java.util.Set<Vehicle> vehicles)
      Returns a copy of this plant model, with its vehicles replaced by the given ones.
      Parameters:
      vehicles - The vehicles.
      Returns:
      A copy of this plant model, with its vehicles replaced by the given ones.
    • getVisualLayouts

      @Nonnull public java.util.Set<VisualLayout> getVisualLayouts()
      Returns the visual layouts in this plant model.
      Returns:
      The visual layouts in this plant model.
    • withVisuaLayouts

      @Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") public PlantModel withVisuaLayouts​(@Nonnull java.util.Set<VisualLayout> visualLayouts)
      Deprecated.
      Returns a copy of this plant model, with its visual layouts replaced by the given ones.
      Parameters:
      visualLayouts - The visual layouts to be set.
      Returns:
      A copy of this plant model, with its visual layouts replaced by the given ones.
    • withVisualLayouts

      public PlantModel withVisualLayouts​(@Nonnull java.util.Set<VisualLayout> visualLayouts)
      Returns a copy of this plant model, with its visual layouts replaced by the given ones.
      Parameters:
      visualLayouts - The visual layouts to be set.
      Returns:
      A copy of this plant model, with its visual layouts replaced by the given ones.
    • toString

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