Class Tuple3<A,​B,​C>

    • Field Detail

      • v1

        public final A v1
        the first value
      • v2

        public final B v2
        the second value
      • v3

        public final C v3
        the third value
    • Constructor Detail

      • Tuple3

        protected Tuple3​(Object[] array)
    • Method Detail

      • of

        public static <A,​B,​C> Tuple3<A,​B,​C> of​(A a,
                                                                       B b,
                                                                       C c)
        Static Constructor
        Type Parameters:
        A - the type parameter
        B - the type parameter
        C - the type parameter
        Parameters:
        a - the a
        b - the b
        c - the c
        Returns:
        the tuple 3
      • appendLeft

        public <T> Tuple4<T,​A,​B,​C> appendLeft​(T object)
        Description copied from class: Tuple
        Appends an item the beginning of the tuple resulting in a new tuple of degree + 1
        Overrides:
        appendLeft in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        object - the object being appended
        Returns:
        A new tuple of degree + 1 containing the object at the beginning
      • appendRight

        public <T> Tuple4<A,​B,​C,​T> appendRight​(T object)
        Description copied from class: Tuple
        Appends an item the end of the tuple resulting in a new tuple of degree + 1
        Overrides:
        appendRight in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        object - the object being appended
        Returns:
        A new tuple of degree + 1 containing the object at the end
      • array

        public Object[] array()
        Description copied from class: Tuple
        The tuple as an array of objects
        Specified by:
        array in class Tuple
        Returns:
        an array representing the items in the tuple
      • copy

        public Tuple copy()
        Description copied from interface: Copyable

        Makes a copy of this object.

        Returns:
        A copy of this object.
      • degree

        public int degree()
        Description copied from class: Tuple
        The number of items in the tuple
        Specified by:
        degree in class Tuple
        Returns:
        the number of items in the tuple
      • get

        public <T> T get​(int i)
        Description copied from class: Tuple
        Gets the ith item of the tuple.
        Overrides:
        get in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        i - the index of the item
        Returns:
        the item at the ith index
      • shiftLeft

        public Tuple2<B,​C> shiftLeft()
        Description copied from class: Tuple
        Shifts the first element of the tuple resulting in a tuple of degree - 1.
        Overrides:
        shiftLeft in class Tuple
        Returns:
        A new tuple without the shifted element;
      • shiftRight

        public Tuple2<A,​B> shiftRight()
        Description copied from class: Tuple
        Shifts the last element of the tuple resulting in a tuple of degree - 1.
        Overrides:
        shiftRight in class Tuple
        Returns:
        A new tuple without the shifted element;