Class Couple<T,​U>

  • Type Parameters:
    T - The first object's type.
    U - The second object's type.

    public class Couple<T,​U>
    extends java.lang.Object
    Relationship between two typed objects.
    Author:
    Jerome Louvel
    • Constructor Summary

      Constructors 
      Constructor Description
      Couple​(T first, U second)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      T getFirst()
      Returns the first object.
      U getSecond()
      Returns the second object.
      int hashCode()
      void setFirst​(T first)
      Sets the first object.
      void setSecond​(U second)
      Sets the second object.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Couple

        public Couple​(T first,
                      U second)
        Constructor.
        Parameters:
        first - The first object.
        second - The second object.
    • Method Detail

      • equals

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

        public T getFirst()
        Returns the first object.
        Returns:
        The first object.
      • getSecond

        public U getSecond()
        Returns the second object.
        Returns:
        The second object.
      • hashCode

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

        public void setFirst​(T first)
        Sets the first object.
        Parameters:
        first - The first object.
      • setSecond

        public void setSecond​(U second)
        Sets the second object.
        Parameters:
        second - The second object.
      • toString

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