| Modifier and Type | Method and Description |
|---|---|
default <T> Iterable<T> |
asIterable()
Return an iterable of the Tuple's values.
|
<R> R |
get(int i)
Gets a value of a specific index from the tuple.
|
default <R> R |
head()
Gets the first element of the tuple
|
default boolean |
isEmpty()
Whether the
Tuple is empty. |
default <R> R |
last()
Gets the last element of the tuple
|
int |
size()
Gets the number of elements of the
Tuple. |
default <T> Stream<T> |
stream()
Stream the tuple's values
|
Tuple |
tail()
Gets a
Tuple with all the elements of this tuple skipping the first
one. |
default Object[] |
toArray()
Convert this
Tuple to an Object[]. |
default <T> T[] |
toArray(T[] arr)
Fill an arrat with the elements of this
Tuple. |
<R> R get(int i)
R - return type of the selected fieldi - 0..n index of the field to geti in the tuple.IndexOutOfBoundsException - thrown when i < 0 or i > n where n is
the last index of the Tupleint size()
Tuple.Tupledefault <R> R head()
R - type to cast to.default <R> R last()
R - type to cast to.default <T> Stream<T> stream()
T - type the values must be casted to.default <T> Iterable<T> asIterable()
T - type the values must be casted to.Tuple tail()
Tuple with all the elements of this tuple skipping the first
one.Tupledefault boolean isEmpty()
falsedefault Object[] toArray()
Tuple to an Object[].Object[] representation of this Tuple.default <T> T[] toArray(T[] arr)
Tuple.T - type of the provided arrayarr - the array to fileCopyright © 2021. All rights reserved.