public final class Tuples extends Object
| Modifier and Type | Method and Description |
|---|---|
static Tuple |
createTuple(Iterable<?> values)
Create a
Tuple of the appropriate cardinality for the given number of objects. |
static Tuple |
createTuple(Object... values)
Create a
Tuple of the appropriate cardinality for the given number of objects. |
static Class<? extends Tuple> |
tupleClassForSize(int size)
Get the
Tuple subinterface having the specified cardinality. |
static int |
tupleSizeOf(Class<? extends Tuple> tupleClass)
Get the cardinality of the given
Tuple subtype. |
public static Tuple createTuple(Iterable<?> values)
Tuple of the appropriate cardinality for the given number of objects.values - tuple valuesIllegalArgumentException - if values is null or emptyUnsupportedOperationException - if values has more elements than exist concrete Tuple classespublic static Tuple createTuple(Object... values)
Tuple of the appropriate cardinality for the given number of objects.values - tuple valuesIllegalArgumentException - if values is null or emptyUnsupportedOperationException - if values has more elements than exist concrete Tuple classespublic static Class<? extends Tuple> tupleClassForSize(int size)
Tuple subinterface having the specified cardinality.size - number of objects in the tupleTuple subinterface with cardinality sizeIllegalArgumentException - if size is less than oneUnsupportedOperationException - if size is more than exist concrete Tuple classespublic static int tupleSizeOf(Class<? extends Tuple> tupleClass)
Tuple subtype.tupleClass - tuple classtupleClassIllegalArgumentException - if tupleClass is not a recognized tuple classCopyright © 2016. All rights reserved.