Package org.opentcs.data.model

# Class Point

java.lang.Object
org.opentcs.data.TCSObject<E>
org.opentcs.data.model.TCSResource<Point>
org.opentcs.data.model.Point

All Implemented Interfaces:
  `java.io.Serializable`

    public class Point
    extends TCSResource<Point>
    implements java.io.Serializable

Describes a position in the driving course at which a `Vehicle` may be located.

See Also:
  `Path`, Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `Point.Layout` | Contains information regarding the grahical representation of a point.
  `static class` | `Point.Type` | Describes the types of positions in a driving course.

- ## Field Summary

  ### Fields inherited from class org.opentcs.data.TCSObject

  `reference`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `Point​(java.lang.String name)` | Creates a new point with the given name.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.util.Set<Location.Link>` | `getAttachedLinks()` | Returns a set of links attached to this point.
  `java.util.Set<TCSObjectReference<Path>>` | `getIncomingPaths()` | Returns a set of references to paths ending in this point.
  `Point.Layout` | `getLayout()` | Returns the information regarding the grahical representation of this point.
  `TCSObjectReference<Vehicle>` | `getOccupyingVehicle()` | Returns a reference to the vehicle occupying this point.
  `java.util.Set<TCSObjectReference<Path>>` | `getOutgoingPaths()` | Returns a set of references to paths originating in this point.
  `Triple` | `getPosition()` | Returns the physical coordinates of this point in mm.
  `Point.Type` | `getType()` | Returns this point's type.
  `double` | `getVehicleOrientationAngle()` | Returns a vehicle's orientation angle at this position.
  `boolean` | `isHaltingPosition()` | Checks whether halting on this point is allowed.
  `boolean` | `isParkingPosition()` | Checks whether parking a vehicle on this point is allowed.
  `Point` | `withAttachedLinks​(java.util.Set<Location.Link> attachedLinks)` | Creates a copy of this object, with the given attached links.
  `TCSObject<Point>` | `withHistory​(ObjectHistory history)` | Creates a copy of this object, with the given history.
  `TCSObject<Point>` | `withHistoryEntry​(ObjectHistory.Entry entry)` | Creates a copy of this object, with the given history entry integrated.
  `Point` | `withIncomingPaths​(java.util.Set<TCSObjectReference<Path>> incomingPaths)` | Creates a copy of this object, with the given incoming paths.
  `Point` | `withLayout​(Point.Layout layout)` | Creates a copy of this object, with the given layout.
  `Point` | `withOccupyingVehicle​(TCSObjectReference<Vehicle> occupyingVehicle)` | Creates a copy of this object, with the given occupying vehicle.
  `Point` | `withOutgoingPaths​(java.util.Set<TCSObjectReference<Path>> outgoingPaths)` | Creates a copy of this object, with the given outgoing paths.
  `Point` | `withPosition​(Triple position)` | Creates a copy of this object, with the given position.
  `Point` | `withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)` | Creates a copy of this object, with the given properties.
  `Point` | `withProperty​(java.lang.String key, java.lang.String value)` | Creates a copy of this object, with the given property integrated.
  `Point` | `withType​(Point.Type type)` | Creates a copy of this object, with the given type.
  `Point` | `withVehicleOrientationAngle​(double vehicleOrientationAngle)` | Creates a copy of this object, with the given vehicle orientation angle.

  ### 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`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Point

    public Point​(java.lang.String name)
    Creates a new point with the given name.
    Parameters:
      `name` - This point's name.

- ## Method Details

  - ### withProperty

    public Point withProperty​(java.lang.String key, java.lang.String value)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given property integrated.
    Specified by:
      `withProperty` in class `TCSObject<Point>`
    Parameters:
      `key` - The key of the property to be changed.
      `value` - The new value of the property, or `null`, if the property is to be removed.
    Returns:
      A copy of this object, with the given property integrated.

  - ### withProperties

    public Point withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given properties.
    Specified by:
      `withProperties` in class `TCSObject<Point>`
    Parameters:
      `properties` - The properties.
    Returns:
      A copy of this object, with the given properties.

  - ### withHistoryEntry

    public TCSObject<Point> withHistoryEntry​(ObjectHistory.Entry entry)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history entry integrated.
    Specified by:
      `withHistoryEntry` in class `TCSObject<Point>`
    Parameters:
      `entry` - The history entry to be integrated.
    Returns:
      A copy of this object, with the given history entry integrated.

  - ### withHistory

    public TCSObject<Point> withHistory​(ObjectHistory history)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history.
    Specified by:
      `withHistory` in class `TCSObject<Point>`
    Parameters:
      `history` - The history.
    Returns:
      A copy of this object, with the given history.

  - ### getPosition

    public Triple getPosition()
    Returns the physical coordinates of this point in mm.
    Returns:
      The physical coordinates of this point in mm.

  - ### withPosition

    public Point withPosition​(Triple position)
    Creates a copy of this object, with the given position.
    Parameters:
      `position` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getVehicleOrientationAngle

    public double getVehicleOrientationAngle()
    Returns a vehicle's orientation angle at this position. (-360..360, or `Double.NaN`, if an orientation angle is not specified for this point.)
    Returns:
      The vehicle's orientation angle when it's at this position.

  - ### withVehicleOrientationAngle

    public Point withVehicleOrientationAngle​(double vehicleOrientationAngle)
    Creates a copy of this object, with the given vehicle orientation angle.
    Parameters:
      `vehicleOrientationAngle` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getType

    public Point.Type getType()
    Returns this point's type.
    Returns:
      This point's type.

  - ### withType

    public Point withType​(Point.Type type)
    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

    public TCSObjectReference<Vehicle> 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

    public Point withOccupyingVehicle​(TCSObjectReference<Vehicle> occupyingVehicle)
    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

    public java.util.Set<TCSObjectReference<Path>> getIncomingPaths()
    Returns a set of references to paths ending in this point.
    Returns:
      A set of references to paths ending in this point.

  - ### withIncomingPaths

    public Point withIncomingPaths​(java.util.Set<TCSObjectReference<Path>> incomingPaths)
    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

    public java.util.Set<TCSObjectReference<Path>> getOutgoingPaths()
    Returns a set of references to paths originating in this point.
    Returns:
      A set of references to paths originating in this point.

  - ### withOutgoingPaths

    public Point withOutgoingPaths​(java.util.Set<TCSObjectReference<Path>> outgoingPaths)
    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

    public java.util.Set<Location.Link> getAttachedLinks()
    Returns a set of links attached to this point.
    Returns:
      A set of links attached to this point.

  - ### withAttachedLinks

    public Point withAttachedLinks​(java.util.Set<Location.Link> attachedLinks)
    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.

  - ### getLayout

    public Point.Layout getLayout()
    Returns the information regarding the grahical representation of this point.
    Returns:
      The information regarding the grahical representation of this point.

  - ### withLayout

    public Point withLayout​(Point.Layout layout)
    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.