Class Couple

java.lang.Object
org.opentcs.data.model.Couple
All Implemented Interfaces:
java.io.Serializable

public class Couple
extends java.lang.Object
implements java.io.Serializable
A generic 2-tuple of long integer values, usable for 2D coordinates and vectors, for instance.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Couple​(long x, long y)
    Creates a new instance.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    long getX()
    Returns the x coordinate.
    long getY()
    Returns the y coordinate.
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Couple

      public Couple​(long x, long y)
      Creates a new instance.
      Parameters:
      x - The X coordinate.
      y - The Y coordinate.
  • Method Details

    • getX

      public long getX()
      Returns the x coordinate.
      Returns:
      x
    • getY

      public long getY()
      Returns the y coordinate.
      Returns:
      y
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

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

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object