Package org.opentcs.data.model
Class Point
- All Implemented Interfaces:
Serializable
A point in the driving course at which a
Vehicle
may be located.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Contains information regarding the grahical representation of a point.static enum
Describes the types of positions in a driving course. -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of links attached to this point.Returns a set of references to paths ending in this point.Returns the information regarding the grahical representation of this point.Returns a reference to the vehicle occupying this point.Returns a set of references to paths originating in this point.getPose()
Returns the pose of the vehicle at this point.getType()
Returns this point's type.Returns a map of envelope keys to envelopes that vehicles located at this point may occupy.boolean
Checks whether halting on this point is allowed.boolean
Checks whether parking a vehicle on this point is allowed.withAttachedLinks
(Set<Location.Link> attachedLinks) Creates a copy of this object, with the given attached links.withHistory
(ObjectHistory history) Creates a copy of this object, with the given history.Creates a copy of this object, with the given history entry integrated.withIncomingPaths
(Set<TCSObjectReference<Path>> incomingPaths) Creates a copy of this object, with the given incoming paths.withLayout
(Point.Layout layout) Creates a copy of this object, with the given layout.withOccupyingVehicle
(TCSObjectReference<Vehicle> occupyingVehicle) Creates a copy of this object, with the given occupying vehicle.withOutgoingPaths
(Set<TCSObjectReference<Path>> outgoingPaths) Creates a copy of this object, with the given outgoing paths.Creates a copy of this object, with the given pose.withProperties
(Map<String, String> properties) Creates a copy of this object, with the given properties.withProperty
(String key, String value) Creates a copy of this object, with the given property integrated.withType
(Point.Type type) Creates a copy of this object, with the given type.withVehicleEnvelopes
(Map<String, Envelope> vehicleEnvelopes) Creates a copy of this object, with the given vehicle envelopes.Methods inherited from class org.opentcs.data.model.TCSResource
getReference
Methods inherited from class org.opentcs.data.TCSObject
equals, getHistory, getName, getProperties, getProperty, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString
-
Constructor Details
-
Point
Creates a new point with the given name.- Parameters:
name
- This point's name.
-
-
Method Details
-
withProperty
Description copied from class:TCSObject
Creates a copy of this object, with the given property integrated.- Specified by:
withProperty
in classTCSObject<Point>
- Parameters:
key
- The key of the property to be changed.value
- The new value of the property, ornull
, if the property is to be removed.- Returns:
- A copy of this object, with the given property integrated.
-
withProperties
Description copied from class:TCSObject
Creates a copy of this object, with the given properties.- Specified by:
withProperties
in classTCSObject<Point>
- Parameters:
properties
- The properties.- Returns:
- A copy of this object, with the given properties.
-
withHistoryEntry
Description copied from class:TCSObject
Creates a copy of this object, with the given history entry integrated.- Specified by:
withHistoryEntry
in classTCSObject<Point>
- Parameters:
entry
- The history entry to be integrated.- Returns:
- A copy of this object, with the given history entry integrated.
-
withHistory
Description copied from class:TCSObject
Creates a copy of this object, with the given history.- Specified by:
withHistory
in classTCSObject<Point>
- Parameters:
history
- The history.- Returns:
- A copy of this object, with the given history.
-
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 value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getType
Returns this point's type.- Returns:
- This point's type.
-
withType
Creates a copy of this object, with the given type.- Parameters:
type
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
isParkingPosition
public boolean isParkingPosition()Checks whether parking a vehicle on this point is allowed.This method is a convenience method; its return value is equal to
getType().equals(Point.Type.PARK_POSITION)
.- Returns:
true
if, and only if, parking is allowed on this point.
-
isHaltingPosition
public boolean isHaltingPosition()Checks whether halting on this point is allowed.This method is a convenience method; its return value is equal to
getType().equals(Point.Type.PARK_POSITION) || getType().equals(Point.Type.HALT_POSITION)
.- Returns:
true
if, and only if, halting is allowed on this point.
-
getOccupyingVehicle
Returns a reference to the vehicle occupying this point.- Returns:
- A reference to the vehicle occupying this point, or
null
, if this point isn't currently occupied by any vehicle.
-
withOccupyingVehicle
Creates a copy of this object, with the given occupying vehicle.- Parameters:
occupyingVehicle
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getIncomingPaths
Returns a set of references to paths ending in this point.- Returns:
- A set of references to paths ending in this point.
-
withIncomingPaths
Creates a copy of this object, with the given incoming paths.- Parameters:
incomingPaths
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getOutgoingPaths
Returns a set of references to paths originating in this point.- Returns:
- A set of references to paths originating in this point.
-
withOutgoingPaths
Creates a copy of this object, with the given outgoing paths.- Parameters:
outgoingPaths
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getAttachedLinks
Returns a set of links attached to this point.- Returns:
- A set of links attached to this point.
-
withAttachedLinks
Creates a copy of this object, with the given attached links.- Parameters:
attachedLinks
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
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
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.
-