Package org.opentcs.access.to.model
Class PointCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.PointCreationTO
- All Implemented Interfaces:
java.io.Serializable
public class PointCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing a point in the plant model.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PointCreationTO.Layout
Contains information regarding the grahical representation of a point. -
Constructor Summary
Constructors Constructor Description PointCreationTO(java.lang.String name)
Creates a new instance. -
Method Summary
Modifier and Type Method Description PointCreationTO.Layout
getLayout()
Returns the information regarding the grahical representation of this point.Pose
getPose()
Returns the pose of the vehicle at this point.Triple
getPosition()
Deprecated.UsegetPose()
instead.Point.Type
getType()
Returns the type of this point.java.util.Map<java.lang.String,Envelope>
getVehicleEnvelopes()
Returns a map of envelope keys to envelopes that vehicles located at this point may occupy.double
getVehicleOrientationAngle()
Deprecated.UsegetPose()
instead.java.lang.String
toString()
PointCreationTO
withLayout(PointCreationTO.Layout layout)
Creates a copy of this object, with the given layout.PointCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.PointCreationTO
withPose(Pose pose)
Creates a copy of this object with the given pose.PointCreationTO
withPosition(Triple position)
Deprecated.UsewithPose(org.opentcs.data.model.Pose)
instead.PointCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.PointCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object and adds the given property.PointCreationTO
withType(Point.Type type)
Creates a copy of this object with the given type.PointCreationTO
withVehicleEnvelopes(java.util.Map<java.lang.String,Envelope> vehicleEnvelopes)
Creates a copy of this object, with the given vehicle envelopes.PointCreationTO
withVehicleOrientationAngle(double vehicleOrientationAngle)
Deprecated.UsewithPose(org.opentcs.data.model.Pose)
instead.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
PointCreationTO
public PointCreationTO(@Nonnull java.lang.String name)Creates a new instance.- Parameters:
name
- The name of this point.
-
-
Method Details
-
withName
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- Parameters:
name
- The new name.- Returns:
- A copy of this object, differing in the given name.
-
getPose
Returns the pose of the vehicle at this point.- Returns:
- The pose of the vehicle at this point.
-
withPose
Creates a copy of this object with the given pose.- Parameters:
pose
- The new pose.- Returns:
- A copy of this object, differing in the given position.
-
getPosition
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") @Nonnull public Triple getPosition()Deprecated.UsegetPose()
instead.Returns the position of this point (in mm).- Returns:
- The position of this point (in mm).
-
withPosition
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") public PointCreationTO withPosition(@Nonnull Triple position)Deprecated.UsewithPose(org.opentcs.data.model.Pose)
instead.Creates a copy of this object with the given position (in mm).- Parameters:
position
- The new position.- Returns:
- A copy of this object, differing in the given position.
-
getVehicleOrientationAngle
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") public double getVehicleOrientationAngle()Deprecated.UsegetPose()
instead.Returns a vehicle's orientation angle at this position. (-360..360, orDouble.NaN
, if an orientation angle is not specified for this point.)- Returns:
- The vehicle's orientation angle when it's at this position.
-
withVehicleOrientationAngle
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") public PointCreationTO withVehicleOrientationAngle(double vehicleOrientationAngle)Deprecated.UsewithPose(org.opentcs.data.model.Pose)
instead.Creates a copy of this object with the vehicle's (assumed) orientation angle when it's at this position. Allowed value range: [-360..360], orDouble.NaN
to indicate that there is no specific orientation angle for this point.- Parameters:
vehicleOrientationAngle
- The new angle.- Returns:
- A copy of this object, differing in the given angle.
-
getType
Returns the type of this point.- Returns:
- The type of this point.
-
withType
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.
-
withProperties
public PointCreationTO 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 classCreationTO
- Parameters:
properties
- The new properties.- Returns:
- A copy of this object, differing in the given properties.
-
withProperty
public PointCreationTO 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 classCreationTO
- 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.
-
getVehicleEnvelopes
Returns a map of envelope keys to envelopes that vehicles located at this point may occupy.- Returns:
- A map of envelope keys to envelopes that vehicles located at this point may occupy.
-
withVehicleEnvelopes
public PointCreationTO withVehicleEnvelopes(@Nonnull java.util.Map<java.lang.String,Envelope> vehicleEnvelopes)Creates a copy of this object, with the given vehicle envelopes.- Parameters:
vehicleEnvelopes
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getLayout
Returns the information regarding the grahical representation of this point.- Returns:
- The information regarding the grahical representation of this point.
-
withLayout
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 classjava.lang.Object
-