Class Pair<T,​U>

  • All Implemented Interfaces:
    java.io.Serializable

    public class Pair<T,​U>
    extends java.lang.Object
    implements java.io.Serializable
    Utility class used to pair two objects.
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(T o1, U o2)
      Create a pair instance.
    • Constructor Detail

      • Pair

        public Pair​(T o1,
                    U o2)
        Create a pair instance.
        Parameters:
        o1 - the first member of the pair
        o2 - the second member of the pair
    • Method Detail

      • first

        public T first()
      • second

        public U second()
      • equals

        public boolean equals​(java.lang.Object o)
        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