Package groovy.lang
Class Tuple<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
groovy.lang.Tuple<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Tuple<E>>
,Iterable<E>
,Collection<E>
,List<E>
- Direct Known Subclasses:
Tuple0
,Tuple1
,Tuple10
,Tuple11
,Tuple12
,Tuple13
,Tuple14
,Tuple15
,Tuple16
,Tuple2
,Tuple3
,Tuple4
,Tuple5
,Tuple6
,Tuple7
,Tuple8
,Tuple9
public class Tuple<E> extends AbstractList<E> implements Serializable, Cloneable, Comparable<Tuple<E>>
Represents a list of Objects.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
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.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray
-
Constructor Details
-
Method Details
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
- Specified by:
toArray
in interfaceList<E>
- Overrides:
toArray
in classAbstractCollection<E>
-
subList
-
subTuple
-
equals
- Specified by:
equals
in interfaceCollection<E>
- Specified by:
equals
in interfaceList<E>
- Overrides:
equals
in classAbstractList<E>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<E>
- Specified by:
hashCode
in interfaceList<E>
- Overrides:
hashCode
in classAbstractList<E>
-
compareTo
- Specified by:
compareTo
in interfaceComparable<E>
-
tuple
Construct a tuple of degree 0. -
tuple
Construct a tuple of degree 1. -
tuple
Construct a tuple of degree 2. -
tuple
Construct a tuple of degree 3. -
tuple
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. -
clone
-