public final class Tuples extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<? extends org.javatuples.Tuple> |
classOfTuple(List<?> objects) |
static Class<? extends org.javatuples.Tuple> |
classOfTuple(Object... objects)
Finds for a list of object the associated tuple class, eg. a
Pair for a list of two object and a Triplet for a list of three. |
static <TUPLE extends org.javatuples.Tuple> |
create(List<?> objects)
Transforms a list of object into a tuple.
|
static <TUPLE extends org.javatuples.Tuple> |
create(Object firstObject,
Object... objects)
Transforms an array of object into a tuple.
|
static <TUPLE extends org.javatuples.Tuple> |
createTupleFromList(List<Object> objects)
Deprecated.
Use the shorter
create method instead. |
static <TUPLE extends org.javatuples.Tuple> |
createTupleFromList(Object... objects)
Deprecated.
Use the shorter
create method instead. |
static <T> List<T> |
toList(org.javatuples.Tuple tuple) |
static List<?> |
toListOfClasses(org.javatuples.Tuple tuple) |
static ParameterizedType |
typeOfTuple(Class<?>... classes)
Gets the final tuple type for a list of class.
|
public static <TUPLE extends org.javatuples.Tuple> TUPLE create(List<?> objects)
TUPLE - the tuple typeobjects - the list of objectorg.seedstack.seed.core.api.SeedException - if the array length is greater than 10public static <TUPLE extends org.javatuples.Tuple> TUPLE create(Object firstObject, Object... objects)
TUPLE - the tuple typeobjects - the array of objectorg.seedstack.seed.core.api.SeedException - if the array length is greater than 10@Deprecated public static <TUPLE extends org.javatuples.Tuple> TUPLE createTupleFromList(Object... objects)
create method instead.TUPLE - the tuple typeobjects - the array of objectorg.seedstack.seed.core.api.SeedException - if the array length is greater than 10@Deprecated public static <TUPLE extends org.javatuples.Tuple> TUPLE createTupleFromList(List<Object> objects)
create method instead.TUPLE - the tuple typeobjects - the list of objectorg.seedstack.seed.core.api.SeedException - if the array length is greater than 10public static Class<? extends org.javatuples.Tuple> classOfTuple(Object... objects)
Pair for a list of two object and a Triplet for a list of three.objects - the list of objectspublic static ParameterizedType typeOfTuple(Class<?>... classes)
For instance, for a list with Customer.class and Order.class the method will return Pair<Customer, Order>.
classes - the tuple's classespublic static <T> List<T> toList(org.javatuples.Tuple tuple)
public static List<?> toListOfClasses(org.javatuples.Tuple tuple)
Copyright © 2013-2015–2015. All rights reserved.