Class Diagram.XYPair

  • Enclosing class:
    Diagram

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

      • 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 Detail

      • 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