Class Pair<X,​Y>

  • Type Parameters:
    X - Type one you want to store.
    Y - Type two you want to store.

    public class Pair<X,​Y>
    extends java.lang.Object
    A generic data holder for two data types.
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(X x, Y y)
      Construct a new pair with two data types.
    • Method Summary

      Modifier and Type Method Description
      X getX()
      Get the value of the data with the type one.
      Y getY()
      Get the value of the data with the type two.
      • Methods inherited from class java.lang.Object

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

      • Pair

        public Pair​(X x,
                    Y y)
        Construct a new pair with two data types.
        Parameters:
        x - Value for data type one.
        y - Value for data type two.
    • Method Detail

      • getX

        public X getX()
        Get the value of the data with the type one.
        Returns:
        data one
      • getY

        public Y getY()
        Get the value of the data with the type two.
        Returns:
        data two