Class ShortPair


  • @Equality
    public class ShortPair
    extends java.lang.Object
    Aggregates two short integer values. Intended (and optimised) for use as a map key.
    Since:
    15 Jan 2015
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      ShortPair​(short x, short y)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      short getX()
      Returns X value.
      short getY()
      Returns Y value.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShortPair

        public ShortPair​(short x,
                         short y)
        Constructor.
        Parameters:
        x - first value
        y - second value
    • Method Detail

      • getX

        public short getX()
        Returns X value.
        Returns:
        x
      • getY

        public short getY()
        Returns Y value.
        Returns:
        y
      • hashCode

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object