Interface Tuple
-
- All Known Implementing Classes:
DoublesPair,IntDoublePair,LongDoublePair,ObjDoublePair,ObjIntPair,Pair,Triple
public interface TupleBase 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.intsize()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,
Pairreturns 2.- Returns:
- the size of the tuple
-
-