Interface Tuple

  • All Superinterfaces:
    BasicTuple<Object>
    All Known Subinterfaces:
    Tuple0, Tuple1<T0>, Tuple10<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>, Tuple11<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>, Tuple12<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>, Tuple13<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>, Tuple14<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>, Tuple15<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>, Tuple16<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>, Tuple17<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>, Tuple18<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>, Tuple19<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>, Tuple2<T0,​T1>, Tuple20<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>, Tuple21<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>, Tuple22<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>, Tuple23<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>, Tuple3<T0,​T1,​T2>, Tuple4<T0,​T1,​T2,​T3>, Tuple5<T0,​T1,​T2,​T3,​T4>, Tuple6<T0,​T1,​T2,​T3,​T4,​T5>, Tuple7<T0,​T1,​T2,​T3,​T4,​T5,​T6>, Tuple8<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7>, Tuple9<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>

    public interface Tuple
    extends BasicTuple<Object>
    This interface defines a generic Tuple of any order that can hold non-null values. A Tuple is type safe, immutable and thread safe. For null value elements see TupleOfNullables
    Author:
    pemi
    See Also:
    TupleOfNullables
    • Method Detail

      • stream

        default Stream<Object> stream()
        Returns a Stream of all values for this Tuple. If sequential, the Stream will start with the 0:th tuple and progress upwards.
        Returns:
        a Stream of all values for this Tuple
      • streamOf

        default <T> Stream<T> streamOf​(Class<T> clazz)
        Description copied from interface: BasicTuple
        Returns a Stream of all values for this Tuple of the given class. I.e. all non-null members of a Tuple that can be cast to the given class are included in the Stream. If sequential, the Stream will start with the 0:th tuple and progress upwards.
        Specified by:
        streamOf in interface BasicTuple<Object>
        Type Parameters:
        T - The type of stream
        Parameters:
        clazz - The class of the type of the stream
        Returns:
        a Stream of all values for this Tuple of the given class
      • getter

        static <TUPLE extends Tuple,​R> TupleGetter<TUPLE,​R> getter​(int index)
        Returns a getter method for the specified ordinal element.
        Type Parameters:
        TUPLE - the type of the tuple
        R - the type of the returned element
        Parameters:
        index - the position of the element to return
        Returns:
        the created getter