Class GridCoordinates2D

  • All Implemented Interfaces:
    Serializable

    public final class GridCoordinates2D
    extends Object
    implements Serializable
    Class representing a pair of integer co-ordinates. This is used in preference to int[] so that the order does not cause issues
    Author:
    Guy Griffiths
    See Also:
    Serialized Form
    • Constructor Detail

      • GridCoordinates2D

        public GridCoordinates2D​(int x,
                                 int y)
        Create a new GridCoordinates2D object
        Parameters:
        x - The x-index
        y - The y-index
    • Method Detail

      • getX

        public int getX()
      • getY

        public int getY()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object