Class Pair<T,​U>

  • 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 Detail

      • first

        public final T first
      • second

        public final U second
    • Constructor Detail

      • Pair

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

      • 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)