Package org.opentcs.data.model
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.UsewithVisualLayouts(java.util.Set)
instead.PlantModel
withVisualLayouts(java.util.Set<VisualLayout> visualLayouts)
Returns a copy of this plant model, with its visual layouts replaced by the given ones.
-
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
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
Returns the points in this plant model.- Returns:
- The points in this plant model.
-
withPoints
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
Returns the paths in this plant model.- Returns:
- The paths in this plant model.
-
withPaths
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
Returns the location types in this plant model.- Returns:
- The location types in this plant model.
-
withLocationTypes
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
Returns the locations in this plant model.- Returns:
- The locations in this plant model.
-
withLocations
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
Returns the blocks in this plant model.- Returns:
- The blocks in this plant model.
-
withBlocks
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
Returns the vehicles in this plant model.- Returns:
- The vehicles in this plant model.
-
withVehicles
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
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.UsewithVisualLayouts(java.util.Set)
instead.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
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 classjava.lang.Object
-