Class Direction.Reference

All Implemented Interfaces:
org.djutils.base.Identifiable
Enclosing class:
Direction

public static final class Direction.Reference extends AbstractReference<Direction.Reference,Angle>
The reference class to define a reference point for the direction.
  • Field Details

  • Constructor Details

    • Reference

      public Reference(String id, String name, Angle offset, Direction.Reference offsetReference)
      Define a new reference point for the direction.
      Parameters:
      id - the id
      name - the name or explanation
      offset - the offset w.r.t. the offsetReference
      offsetReference - the reference to which the offset is relative
    • Reference

      public Reference(String id, String name, Angle offset)
      Define a new reference point for the direction.
      Parameters:
      id - the id
      name - the name or explanation
      offset - the offset w.r.t. EAST
  • Method Details

    • add

      public static void add(String id, String name, Angle offset, Direction.Reference offsetReference)
      Define a new reference point for the direction.
      Parameters:
      id - the id
      name - the name or explanation
      offset - the offset w.r.t. offsetReference
      offsetReference - the reference to which the offset is relative
    • add

      public static void add(String id, String name, Angle offset)
      Define a new reference point for the direction.
      Parameters:
      id - the id
      name - the name or explanation
      offset - the offset w.r.t. EAST
    • get

      public static Direction.Reference get(String id)
      Get a reference point for the direction, based on its id. Return null when the id could not be found.
      Parameters:
      id - the id
      Returns:
      the DirectionReference object