Class Pair<T1,​T2>

java.lang.Object
org.reldb.toolbox.types.Pair<T1,​T2>
Type Parameters:
T1 - First item type.
T2 - Second item type.

public class Pair<T1,​T2> extends Object
A pair of instances of specified types.
  • Field Details

    • left

      public final T1 left
      Left instance.
  • Constructor Details

    • Pair

      public Pair(T1 left, T2 right)
      Constructor.
      Parameters:
      left - Left instance.
      right - Right instance.
  • Method Details

    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getKey

      public T1 getKey()
      Obtain the left instance.
      Returns:
      Left instance.
    • getValue

      public T2 getValue()
      Obtain the right instance.
      Returns:
      Right instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object