Class BoardCoordinates

java.lang.Object
uk.ac.manchester.spinnaker.spalloc.messages.BoardCoordinates

@Immutable public final class BoardCoordinates extends Object
The logical coordinates of a board. This would be TriadCoords except it has a different serialization form for backward-compatibility.
  • Constructor Details

    • BoardCoordinates

      public BoardCoordinates(int x, int y, int z)
      Create with given coordinates.
      Parameters:
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
    • BoardCoordinates

      public BoardCoordinates(TriadCoords triad)
      Create with given coordinates.
      Parameters:
      triad - the coordinates in standard form
  • Method Details

    • getX

      public int getX()
      Returns:
      the X coordinate
    • getY

      public int getY()
      Returns:
      the Y coordinate
    • getZ

      public int getZ()
      Returns:
      the Z coordinate
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStandardCoords

      public TriadCoords toStandardCoords()
      Convert to the standard coordinate scheme.
      Returns:
      the coordinates