Package org.opentcs.data.model

# Class Path.Layout

java.lang.Object
org.opentcs.data.model.Path.Layout

All Implemented Interfaces:
  `java.io.Serializable`

Enclosing class:
  Path

    public static class Path.Layout
    extends java.lang.Object
    implements java.io.Serializable

Contains information regarding the grahical representation of a path.

See Also:
  Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `Path.Layout.ConnectionType` | The connection type a path is represented as.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `Layout()` | Creates a new instance.
  `Layout​(Path.Layout.ConnectionType connectionType, java.util.List<Couple> controlPoints, int layerId)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `Path.Layout.ConnectionType` | `getConnectionType()` | Returns the connection type the path is represented as.
  `java.util.List<Couple>` | `getControlPoints()` | Returns the control points describing the way the path is drawn.
  `int` | `getLayerId()` | Returns the ID of the layer on which the path is to be drawn.
  `Path.Layout` | `withConnectionType​(Path.Layout.ConnectionType connectionType)` | Creates a copy of this object, with the given connection type.
  `Path.Layout` | `withControlPoints​(java.util.List<Couple> controlPoints)` | Creates a copy of this object, with the given control points.
  `Path.Layout` | `withLayer​(int layerId)` | Creates a copy of this object, with the given layer ID.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Layout

    public Layout()
    Creates a new instance.

  - ### Layout

    public Layout​(Path.Layout.ConnectionType connectionType, java.util.List<Couple> controlPoints, int layerId)
    Creates a new instance.
    Parameters:
      `connectionType` - The connection type a path is represented as.
      `controlPoints` - Control points describing the way the path is drawn.
      `layerId` - The ID of the layer on which the path is to be drawn.

- ## Method Details

  - ### getConnectionType

    public Path.Layout.ConnectionType getConnectionType()
    Returns the connection type the path is represented as.
    Returns:
      The connection type the path is represented as.

  - ### withConnectionType

    public Path.Layout withConnectionType​(Path.Layout.ConnectionType connectionType)
    Creates a copy of this object, with the given connection type.
    Parameters:
      `connectionType` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getControlPoints

    public java.util.List<Couple> getControlPoints()
    Returns the control points describing the way the path is drawn. Returns an empty list if connection type is not `Path.Layout.ConnectionType.BEZIER`, `Path.Layout.ConnectionType.BEZIER_3` or `Path.Layout.ConnectionType.POLYPATH`.
    Returns:
      The control points describing the way the path is drawn.

  - ### withControlPoints

    public Path.Layout withControlPoints​(java.util.List<Couple> controlPoints)
    Creates a copy of this object, with the given control points.
    Parameters:
      `controlPoints` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getLayerId

    public int getLayerId()
    Returns the ID of the layer on which the path is to be drawn.
    Returns:
      The layer ID.

  - ### withLayer

    public Path.Layout withLayer​(int layerId)
    Creates a copy of this object, with the given layer ID.
    Parameters:
      `layerId` - The value to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.