Class Tuple<T1,​T2>

  • Type Parameters:
    T1 - type of the first value.
    T2 - type of the second value.

    public class Tuple<T1,​T2>
    extends Object
    Class which provides a data structure that represents a pair consisting of two elements.
    • Constructor Detail

      • Tuple

        public Tuple​(T1 value1,
                     T2 value2)
        Constructs a tuple of two elements.
        Parameters:
        value1 - the first value.
        value2 - the second value.
    • Method Detail

      • getValue1

        public T1 getValue1()
        Retrieves the first value of the Tuple.
        Returns:
        the first value of the Tuple.
      • getValue2

        public T2 getValue2()
        Retrieves the second value of the Tuple.
        Returns:
        the second value of the Tuple.