Class Tuples


  • public final class Tuples
    extends Object
    This class consists exclusively of static methods that operate on or return Tuples.
    Since:
    2.0.0
    Author:
    Marcel Overdijk
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T1> Tuple1<T1> of​(T1 element1)
      Creates a Tuple of 1 element.
      static <T1,​T2>
      Tuple2<T1,​T2>
      of​(T1 element1, T2 element2)
      Creates a Tuple of 2 elements.
      static <T1,​T2,​T3>
      Tuple3<T1,​T2,​T3>
      of​(T1 element1, T2 element2, T3 element3)
      Creates a Tuple of 3 elements.
      static <T1,​T2,​T3,​T4>
      Tuple4<T1,​T2,​T3,​T4>
      of​(T1 element1, T2 element2, T3 element3, T4 element4)
      Creates a Tuple of 4 elements.
      static <T1,​T2,​T3,​T4,​T5>
      Tuple5<T1,​T2,​T3,​T4,​T5>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5)
      Creates a Tuple of 5 elements.
      static <T1,​T2,​T3,​T4,​T5,​T6>
      Tuple6<T1,​T2,​T3,​T4,​T5,​T6>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5, T6 element6)
      Creates a Tuple of 6 elements.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7>
      Tuple7<T1,​T2,​T3,​T4,​T5,​T6,​T7>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5, T6 element6, T7 element7)
      Creates a Tuple of 7 elements.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      Tuple8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5, T6 element6, T7 element7, T8 element8)
      Creates a Tuple of 8 elements.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      Tuple9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5, T6 element6, T7 element7, T8 element8, T9 element9)
      Creates a Tuple of 9 elements.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>
      Tuple10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>
      of​(T1 element1, T2 element2, T3 element3, T4 element4, T5 element5, T6 element6, T7 element7, T8 element8, T9 element9, T10 element10)
      Creates a Tuple of 10 elements.
    • Method Detail

      • of

        public static <T1> Tuple1<T1> of​(T1 element1)
        Creates a Tuple of 1 element.
      • of

        public static <T1,​T2> Tuple2<T1,​T2> of​(T1 element1,
                                                           T2 element2)
        Creates a Tuple of 2 elements.
      • of

        public static <T1,​T2,​T3> Tuple3<T1,​T2,​T3> of​(T1 element1,
                                                                             T2 element2,
                                                                             T3 element3)
        Creates a Tuple of 3 elements.
      • of

        public static <T1,​T2,​T3,​T4> Tuple4<T1,​T2,​T3,​T4> of​(T1 element1,
                                                                                               T2 element2,
                                                                                               T3 element3,
                                                                                               T4 element4)
        Creates a Tuple of 4 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5> Tuple5<T1,​T2,​T3,​T4,​T5> of​(T1 element1,
                                                                                                                 T2 element2,
                                                                                                                 T3 element3,
                                                                                                                 T4 element4,
                                                                                                                 T5 element5)
        Creates a Tuple of 5 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5,​T6> Tuple6<T1,​T2,​T3,​T4,​T5,​T6> of​(T1 element1,
                                                                                                                                   T2 element2,
                                                                                                                                   T3 element3,
                                                                                                                                   T4 element4,
                                                                                                                                   T5 element5,
                                                                                                                                   T6 element6)
        Creates a Tuple of 6 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7> Tuple7<T1,​T2,​T3,​T4,​T5,​T6,​T7> of​(T1 element1,
                                                                                                                                                     T2 element2,
                                                                                                                                                     T3 element3,
                                                                                                                                                     T4 element4,
                                                                                                                                                     T5 element5,
                                                                                                                                                     T6 element6,
                                                                                                                                                     T7 element7)
        Creates a Tuple of 7 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> Tuple8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> of​(T1 element1,
                                                                                                                                                                       T2 element2,
                                                                                                                                                                       T3 element3,
                                                                                                                                                                       T4 element4,
                                                                                                                                                                       T5 element5,
                                                                                                                                                                       T6 element6,
                                                                                                                                                                       T7 element7,
                                                                                                                                                                       T8 element8)
        Creates a Tuple of 8 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> Tuple9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> of​(T1 element1,
                                                                                                                                                                                         T2 element2,
                                                                                                                                                                                         T3 element3,
                                                                                                                                                                                         T4 element4,
                                                                                                                                                                                         T5 element5,
                                                                                                                                                                                         T6 element6,
                                                                                                                                                                                         T7 element7,
                                                                                                                                                                                         T8 element8,
                                                                                                                                                                                         T9 element9)
        Creates a Tuple of 9 elements.
      • of

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10> Tuple10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10> of​(T1 element1,
                                                                                                                                                                                                              T2 element2,
                                                                                                                                                                                                              T3 element3,
                                                                                                                                                                                                              T4 element4,
                                                                                                                                                                                                              T5 element5,
                                                                                                                                                                                                              T6 element6,
                                                                                                                                                                                                              T7 element7,
                                                                                                                                                                                                              T8 element8,
                                                                                                                                                                                                              T9 element9,
                                                                                                                                                                                                              T10 element10)
        Creates a Tuple of 10 elements.