Package 

Class Pair

  • All Implemented Interfaces:

    
    public class Pair<X, Y>
    
                        

    A generic data holder for two data types.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final X x
      private final Y y
    • Constructor Summary

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

      Enum Constants 
      Enum Constant Description
    • 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

        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

         X getX()

        Get the value of the data with the type one.

      • getY

         Y getY()

        Get the value of the data with the type two.