Class Diagram.XYPair

java.lang.Object
org.opentrafficsim.trafficcontrol.trafcod.Diagram.XYPair
Enclosing class:
Diagram

class Diagram.XYPair extends Object
Pack two integer coordinates in one object.
  • Constructor Details

    • XYPair

      XYPair(int x, int y)
      Construct a new XY pair.
      Parameters:
      x - int; the X value
      y - int; the Y value
    • XYPair

      XYPair(Diagram.RouteStep routeStep)
      Construct a new XY pair from a route step.
      Parameters:
      routeStep - RouteStep; the route step
    • XYPair

      XYPair(Diagram.XYPair in, int quadrant)
      Construct a rotated version of an XYPair.
      Parameters:
      in - XYPair; the initial version
      quadrant - int; the quadrant
  • Method Details

    • getX

      public int getX()
      Retrieve the X value.
      Returns:
      int; the X value
    • getY

      public int getY()
      Retrieve the Y value.
      Returns:
      int; the Y value
    • toString

      public String toString()
      Overrides:
      toString in class Object