Interface Tuple
-
- All Known Implementing Classes:
DoublesPair
,IntDoublePair
,LongDoublePair
,ObjDoublePair
,ObjIntPair
,Pair
,Triple
public interface Tuple
Base interface for all tuple types.An ordered list of elements of a fixed size, where each element can have a different type.
All implementations must be final, immutable and thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Object>
elements()
Gets the elements from this tuple as a list.int
size()
Gets the number of elements held by this tuple.
-
-
-
Method Detail
-
size
int size()
Gets the number of elements held by this tuple.Each tuple type has a fixed size, returned by this method. For example,
Pair
returns 2.- Returns:
- the size of the tuple
-
-