Interface Tuple<CONCRETE_TUPLE extends Tuple<CONCRETE_TUPLE>>

    • Method Detail

      • arity

        int arity()
        Number of arguments/elements in the Tuple
        Returns:
        Number of arguments/elements in the Tuple
      • toList

        List<?> toList()
        Convert the Tuple to a list
        Returns:
        list of all Tuple elements
      • of

        static <T1> Single<T1> of​(T1 t1)
        Create a new Tuple with 1 element
        Type Parameters:
        T1 - the first element type
        Parameters:
        t1 - the first element
        Returns:
        the newly created Single tuple
      • of

        static <T1,​T2> Pair<T1,​T2> of​(T1 t1,
                                                  T2 t2)
        Create a new Tuple with 2 elements
        Type Parameters:
        T1 - the first element type
        T2 - the second element type
        Parameters:
        t1 - the first element
        t2 - the second element
        Returns:
        the newly created Pair tuple
      • fromEntry

        static <T1,​T2> Pair<T1,​T2> fromEntry​(Map.Entry<? extends T1,​? extends T2> entry)
        Create a new Tuple with 2 elements from a Map Map.Entry
        Type Parameters:
        T1 - the first element type
        T2 - the second element type
        Parameters:
        entry - the map entry
        Returns:
        the newly created Pair tuple
      • of

        static <T1,​T2,​T3> Triple<T1,​T2,​T3> of​(T1 t1,
                                                                      T2 t2,
                                                                      T3 t3)
        Create a new Tuple with 3 elements
        Type Parameters:
        T1 - the first element type
        T2 - the second element type
        T3 - the third element type
        Parameters:
        t1 - the first element
        t2 - the second element
        t3 - the third element
        Returns:
        the newly created Triple tuple