Package groovy.lang

Class Tuple<E>

    • Constructor Summary

      Constructors 
      Constructor Description
      Tuple​(E... contents)  
      Tuple​(Tuple<E> tuple)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Tuple<E> clone()  
      int compareTo​(Tuple<E> other)  
      boolean equals​(Object o)  
      E get​(int index)  
      int hashCode()  
      int size()  
      List<E> subList​(int fromIndex, int toIndex)  
      Tuple<E> subTuple​(int fromIndex, int toIndex)  
      E[] toArray()  
      static Tuple0 tuple()
      Construct a tuple of degree 0.
      static <T1> Tuple1<T1> tuple​(T1 v1)
      Construct a tuple of degree 1.
      static <T1,​T2>
      Tuple2<T1,​T2>
      tuple​(T1 v1, T2 v2)
      Construct a tuple of degree 2.
      static <T1,​T2,​T3>
      Tuple3<T1,​T2,​T3>
      tuple​(T1 v1, T2 v2, T3 v3)
      Construct a tuple of degree 3.
      static <T1,​T2,​T3,​T4>
      Tuple4<T1,​T2,​T3,​T4>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4)
      Construct a tuple of degree 4.
      static <T1,​T2,​T3,​T4,​T5>
      Tuple5<T1,​T2,​T3,​T4,​T5>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5)
      Construct a tuple of degree 5.
      static <T1,​T2,​T3,​T4,​T5,​T6>
      Tuple6<T1,​T2,​T3,​T4,​T5,​T6>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6)
      Construct a tuple of degree 6.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7>
      Tuple7<T1,​T2,​T3,​T4,​T5,​T6,​T7>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7)
      Construct a tuple of degree 7.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      Tuple8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)
      Construct a tuple of degree 8.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      Tuple9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9)
      Construct a tuple of degree 9.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>
      Tuple10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10)
      Construct a tuple of degree 10.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>
      Tuple11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11)
      Construct a tuple of degree 11.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>
      Tuple12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12)
      Construct a tuple of degree 12.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>
      Tuple13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13)
      Construct a tuple of degree 13.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>
      Tuple14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14)
      Construct a tuple of degree 14.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>
      Tuple15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15)
      Construct a tuple of degree 15.
      static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>
      Tuple16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>
      tuple​(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16)
      Construct a tuple of degree 16.
    • Method Detail

      • subTuple

        public Tuple<E> subTuple​(int fromIndex,
                                 int toIndex)
      • tuple

        public static Tuple0 tuple()
        Construct a tuple of degree 0.
      • tuple

        public static <T1> Tuple1<T1> tuple​(T1 v1)
        Construct a tuple of degree 1.
      • tuple

        public static <T1,​T2> Tuple2<T1,​T2> tuple​(T1 v1,
                                                              T2 v2)
        Construct a tuple of degree 2.
      • tuple

        public static <T1,​T2,​T3> Tuple3<T1,​T2,​T3> tuple​(T1 v1,
                                                                                T2 v2,
                                                                                T3 v3)
        Construct a tuple of degree 3.
      • tuple

        public static <T1,​T2,​T3,​T4> Tuple4<T1,​T2,​T3,​T4> tuple​(T1 v1,
                                                                                                  T2 v2,
                                                                                                  T3 v3,
                                                                                                  T4 v4)
        Construct a tuple of degree 4.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5> Tuple5<T1,​T2,​T3,​T4,​T5> tuple​(T1 v1,
                                                                                                                    T2 v2,
                                                                                                                    T3 v3,
                                                                                                                    T4 v4,
                                                                                                                    T5 v5)
        Construct a tuple of degree 5.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6> Tuple6<T1,​T2,​T3,​T4,​T5,​T6> tuple​(T1 v1,
                                                                                                                                      T2 v2,
                                                                                                                                      T3 v3,
                                                                                                                                      T4 v4,
                                                                                                                                      T5 v5,
                                                                                                                                      T6 v6)
        Construct a tuple of degree 6.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7> Tuple7<T1,​T2,​T3,​T4,​T5,​T6,​T7> tuple​(T1 v1,
                                                                                                                                                        T2 v2,
                                                                                                                                                        T3 v3,
                                                                                                                                                        T4 v4,
                                                                                                                                                        T5 v5,
                                                                                                                                                        T6 v6,
                                                                                                                                                        T7 v7)
        Construct a tuple of degree 7.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> Tuple8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> tuple​(T1 v1,
                                                                                                                                                                          T2 v2,
                                                                                                                                                                          T3 v3,
                                                                                                                                                                          T4 v4,
                                                                                                                                                                          T5 v5,
                                                                                                                                                                          T6 v6,
                                                                                                                                                                          T7 v7,
                                                                                                                                                                          T8 v8)
        Construct a tuple of degree 8.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> Tuple9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> tuple​(T1 v1,
                                                                                                                                                                                            T2 v2,
                                                                                                                                                                                            T3 v3,
                                                                                                                                                                                            T4 v4,
                                                                                                                                                                                            T5 v5,
                                                                                                                                                                                            T6 v6,
                                                                                                                                                                                            T7 v7,
                                                                                                                                                                                            T8 v8,
                                                                                                                                                                                            T9 v9)
        Construct a tuple of degree 9.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10> Tuple10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10> tuple​(T1 v1,
                                                                                                                                                                                                                 T2 v2,
                                                                                                                                                                                                                 T3 v3,
                                                                                                                                                                                                                 T4 v4,
                                                                                                                                                                                                                 T5 v5,
                                                                                                                                                                                                                 T6 v6,
                                                                                                                                                                                                                 T7 v7,
                                                                                                                                                                                                                 T8 v8,
                                                                                                                                                                                                                 T9 v9,
                                                                                                                                                                                                                 T10 v10)
        Construct a tuple of degree 10.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11> Tuple11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11> tuple​(T1 v1,
                                                                                                                                                                                                                                     T2 v2,
                                                                                                                                                                                                                                     T3 v3,
                                                                                                                                                                                                                                     T4 v4,
                                                                                                                                                                                                                                     T5 v5,
                                                                                                                                                                                                                                     T6 v6,
                                                                                                                                                                                                                                     T7 v7,
                                                                                                                                                                                                                                     T8 v8,
                                                                                                                                                                                                                                     T9 v9,
                                                                                                                                                                                                                                     T10 v10,
                                                                                                                                                                                                                                     T11 v11)
        Construct a tuple of degree 11.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12> Tuple12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12> tuple​(T1 v1,
                                                                                                                                                                                                                                                         T2 v2,
                                                                                                                                                                                                                                                         T3 v3,
                                                                                                                                                                                                                                                         T4 v4,
                                                                                                                                                                                                                                                         T5 v5,
                                                                                                                                                                                                                                                         T6 v6,
                                                                                                                                                                                                                                                         T7 v7,
                                                                                                                                                                                                                                                         T8 v8,
                                                                                                                                                                                                                                                         T9 v9,
                                                                                                                                                                                                                                                         T10 v10,
                                                                                                                                                                                                                                                         T11 v11,
                                                                                                                                                                                                                                                         T12 v12)
        Construct a tuple of degree 12.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13> Tuple13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13> tuple​(T1 v1,
                                                                                                                                                                                                                                                                             T2 v2,
                                                                                                                                                                                                                                                                             T3 v3,
                                                                                                                                                                                                                                                                             T4 v4,
                                                                                                                                                                                                                                                                             T5 v5,
                                                                                                                                                                                                                                                                             T6 v6,
                                                                                                                                                                                                                                                                             T7 v7,
                                                                                                                                                                                                                                                                             T8 v8,
                                                                                                                                                                                                                                                                             T9 v9,
                                                                                                                                                                                                                                                                             T10 v10,
                                                                                                                                                                                                                                                                             T11 v11,
                                                                                                                                                                                                                                                                             T12 v12,
                                                                                                                                                                                                                                                                             T13 v13)
        Construct a tuple of degree 13.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14> Tuple14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14> tuple​(T1 v1,
                                                                                                                                                                                                                                                                                                 T2 v2,
                                                                                                                                                                                                                                                                                                 T3 v3,
                                                                                                                                                                                                                                                                                                 T4 v4,
                                                                                                                                                                                                                                                                                                 T5 v5,
                                                                                                                                                                                                                                                                                                 T6 v6,
                                                                                                                                                                                                                                                                                                 T7 v7,
                                                                                                                                                                                                                                                                                                 T8 v8,
                                                                                                                                                                                                                                                                                                 T9 v9,
                                                                                                                                                                                                                                                                                                 T10 v10,
                                                                                                                                                                                                                                                                                                 T11 v11,
                                                                                                                                                                                                                                                                                                 T12 v12,
                                                                                                                                                                                                                                                                                                 T13 v13,
                                                                                                                                                                                                                                                                                                 T14 v14)
        Construct a tuple of degree 14.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15> Tuple15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15> tuple​(T1 v1,
                                                                                                                                                                                                                                                                                                                     T2 v2,
                                                                                                                                                                                                                                                                                                                     T3 v3,
                                                                                                                                                                                                                                                                                                                     T4 v4,
                                                                                                                                                                                                                                                                                                                     T5 v5,
                                                                                                                                                                                                                                                                                                                     T6 v6,
                                                                                                                                                                                                                                                                                                                     T7 v7,
                                                                                                                                                                                                                                                                                                                     T8 v8,
                                                                                                                                                                                                                                                                                                                     T9 v9,
                                                                                                                                                                                                                                                                                                                     T10 v10,
                                                                                                                                                                                                                                                                                                                     T11 v11,
                                                                                                                                                                                                                                                                                                                     T12 v12,
                                                                                                                                                                                                                                                                                                                     T13 v13,
                                                                                                                                                                                                                                                                                                                     T14 v14,
                                                                                                                                                                                                                                                                                                                     T15 v15)
        Construct a tuple of degree 15.
      • tuple

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16> Tuple16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16> tuple​(T1 v1,
                                                                                                                                                                                                                                                                                                                                         T2 v2,
                                                                                                                                                                                                                                                                                                                                         T3 v3,
                                                                                                                                                                                                                                                                                                                                         T4 v4,
                                                                                                                                                                                                                                                                                                                                         T5 v5,
                                                                                                                                                                                                                                                                                                                                         T6 v6,
                                                                                                                                                                                                                                                                                                                                         T7 v7,
                                                                                                                                                                                                                                                                                                                                         T8 v8,
                                                                                                                                                                                                                                                                                                                                         T9 v9,
                                                                                                                                                                                                                                                                                                                                         T10 v10,
                                                                                                                                                                                                                                                                                                                                         T11 v11,
                                                                                                                                                                                                                                                                                                                                         T12 v12,
                                                                                                                                                                                                                                                                                                                                         T13 v13,
                                                                                                                                                                                                                                                                                                                                         T14 v14,
                                                                                                                                                                                                                                                                                                                                         T15 v15,
                                                                                                                                                                                                                                                                                                                                         T16 v16)
        Construct a tuple of degree 16.