- All Superinterfaces:
Iterable<X>
- All Known Implementing Classes:
Tuple0,Tuple1,Tuple2,Tuple3,Tuple4,Tuple5,Tuple6,Tuple7,Tuple8,TupleN
A Tuple is a sequence of items of the same class of item.
Tuples are immutable. .equals is "by value".
-
Method Summary
Modifier and TypeMethodDescriptiondefault X[]Copy the elements of this Tuple into a newly created arrayasList()Convert to a ListbooleanforEachdefault voidCopy the elements of this Tuple into the arraydefault voidCopy the elements of this Tuple start at 'start' into the arraydefault voidCopy the elements of this Tuple into the arraydefault voidforEachget(int i) Get the i'th element, for i in the range 0 to len()-1default booleanisEmpty()Return true if this is a zero-length tupleiterator()Iterableintlen()length : elements are 0 to len()-1<Y> Tuple<Y>Map to a new tuple.stream()streamMethods inherited from interface java.lang.Iterable
spliterator
-
Method Details
-
get
Get the i'th element, for i in the range 0 to len()-1- Throws:
IndexOutOfBoundsException- for i out of range
-
len
int len()length : elements are 0 to len()-1 -
isEmpty
default boolean isEmpty()Return true if this is a zero-length tuple -
asList
Convert to a List -
contains
forEach -
stream
stream -
forEach
forEach -
map
Map to a new tuple. -
iterator
Iterable -
copyInto
Copy the elements of this Tuple into the array -
copyInto
Copy the elements of this Tuple start at 'start' into the array -
copyInto
Copy the elements of this Tuple into the array -
asArray
Copy the elements of this Tuple into a newly created array
-