Class Tuple4<A,​B,​C,​D>

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

        public final D v4
        The fourth value
    • Constructor Detail

      • Tuple4

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

      • of

        public static <A,​B,​C,​D> Tuple4<A,​B,​C,​D> of​(A a,
                                                                                       B b,
                                                                                       C c,
                                                                                       D d)
        Static constructor
        Type Parameters:
        A - the type parameter
        B - the type parameter
        C - the type parameter
        D - the type parameter
        Parameters:
        a - the a
        b - the b
        c - the c
        d - the d
        Returns:
        the tuple 4
      • 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 Tuple4<A,​B,​C,​D> 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 Tuple3<B,​C,​D> 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 Tuple3<A,​B,​C> 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;