Type Parameters:
T - - First element of the pair.
U - - Second element of the pair.
All Implemented Interfaces:
Notifier, EObject, InternalEObject

public final class Pair<T,U> extends EObjectImpl
Encapsulation-class for two elements.
  • Field Details

    • first

      public final T first
    • second

      public final U second
  • Constructor Details

    • Pair

      public Pair(T first, U second)
      The constructor.
      Parameters:
      first - - First element of the pair.
      second - - Second element of the pair.
  • Method Details

    • getFirst

      public T getFirst()
      Getter for the first element.
      Returns:
      The first element.
    • getSecond

      public U getSecond()
      Getter for the second element.
      Returns:
      The second element.
    • of

      public static <T, U> Pair<T,U> of(T first, U second)
    • toString

      public String toString()
      Overrides:
      toString in class BasicEObjectImpl