public class Tuples extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Tuples.Tuple2<T1,T2> |
protected static class |
Tuples.Tuple2Comparator<T1,T2> |
static class |
Tuples.Tuple2Serializer<T1,T2> |
protected static class |
Tuples.Tuple2TypeFactory<T1,T2> |
static class |
Tuples.Tuple3<T1,T2,T3> |
static class |
Tuples.Tuple3Serializer<T1,T2,T3> |
protected static class |
Tuples.Tuple3TypeFactory<T1,T2,T3> |
static class |
Tuples.Tuple4<T1,T2,T3,T4> |
static class |
Tuples.Tuple4Serializer<T1,T2,T3,T4> |
protected static class |
Tuples.Tuple4TypeFactory<T1,T2,T3,T4> |
static interface |
Tuples.TupleFactory<T> |
static class |
Tuples.TupleN |
static class |
Tuples.TupleNSerializer |
protected static class |
Tuples.TupleNTypeFactory |
Modifier and Type | Method and Description |
---|---|
protected static int |
compareValues(Object value1,
Object value2) |
static org.mapdb.Serializer<Tuples.TupleN> |
serializer(org.mapdb.Serializer<?>[] serializers)
Create a
Serializer for n-ary tuples |
static org.mapdb.Serializer<?> |
serializer(org.mapdb.Serializer<?> serializer,
int tupleSize)
Create a
Serializer for uniform tuples. |
static <T1,T2> org.mapdb.Serializer<Tuples.Tuple2<T1,T2>> |
serializer(org.mapdb.Serializer<T1> first,
org.mapdb.Serializer<T2> second)
Create a
Serializer for tuples of size 2. |
static <T1,T2,T3> org.mapdb.Serializer<Tuples.Tuple3<T1,T2,T3>> |
serializer(org.mapdb.Serializer<T1> first,
org.mapdb.Serializer<T2> second,
org.mapdb.Serializer<T3> third)
Create a
Serializer for tuples of size 3. |
static <T1,T2,T3,T4> |
serializer(org.mapdb.Serializer<T1> first,
org.mapdb.Serializer<T2> second,
org.mapdb.Serializer<T3> third,
org.mapdb.Serializer<T4> fourth)
Create a
Serializer for tuples of size 4. |
static Tuples.TupleN |
tuple(Object[] values)
Create a tuple with the given values.
|
static <T1,T2> Tuples.Tuple2<T1,T2> |
tuple(T1 v1,
T2 v2)
Create a tuple with the given two values.
|
static <T1,T2,T3> Tuples.Tuple3<T1,T2,T3> |
tuple(T1 v1,
T2 v2,
T3 v3)
Create a tuple with the given three values.
|
static <T1,T2,T3,T4> |
tuple(T1 v1,
T2 v2,
T3 v3,
T4 v4)
Create a tuple with the given four values.
|
static TypeSystem.TypeFactory<?> |
typeFactory(Collection<TypeSystem.TypeFactory<?>> types)
Create a type factory for n-ary tuples.
|
static TypeSystem.TypeFactory<?> |
typeFactory(TypeSystem.TypeFactory<?> type,
int tupleSize)
Create a type factory for uniform tuples.
|
static <T1,T2> TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>> |
typeFactory(TypeSystem.TypeFactory<T1> type1,
TypeSystem.TypeFactory<T2> type2)
Create a type factory for tuples of size 2.
|
static <T1,T2,T3> TypeSystem.TypeFactory<Tuples.Tuple3<T1,T2,T3>> |
typeFactory(TypeSystem.TypeFactory<T1> type1,
TypeSystem.TypeFactory<T2> type2,
TypeSystem.TypeFactory<T3> type3)
Create a type factory for tuples of size 3.
|
static <T1,T2,T3,T4> |
typeFactory(TypeSystem.TypeFactory<T1> type1,
TypeSystem.TypeFactory<T2> type2,
TypeSystem.TypeFactory<T3> type3,
TypeSystem.TypeFactory<T4> type4)
Create a type factory for tuples of size 4.
|
public static <T1,T2> Tuples.Tuple2<T1,T2> tuple(T1 v1, T2 v2)
v1
- the first valuev2
- the second valuepublic static <T1,T2,T3> Tuples.Tuple3<T1,T2,T3> tuple(T1 v1, T2 v2, T3 v3)
v1
- the first valuev2
- the second valuev3
- the third valuepublic static <T1,T2,T3,T4> Tuples.Tuple4<T1,T2,T3,T4> tuple(T1 v1, T2 v2, T3 v3, T4 v4)
v1
- the first valuev2
- the second valuev3
- the third valuev4
- the fourth valuepublic static Tuples.TupleN tuple(Object[] values)
tuple(Object, Object)
,
tuple(Object, Object, Object)
or tuple(Object, Object, Object, Object)
for tuples smaller than 5.values
- the valuespublic static <T1,T2> TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>> typeFactory(TypeSystem.TypeFactory<T1> type1, TypeSystem.TypeFactory<T2> type2)
type1
- the first type; may not be nulltype2
- the second type; may not be nullpublic static <T1,T2,T3> TypeSystem.TypeFactory<Tuples.Tuple3<T1,T2,T3>> typeFactory(TypeSystem.TypeFactory<T1> type1, TypeSystem.TypeFactory<T2> type2, TypeSystem.TypeFactory<T3> type3)
type1
- the first type; may not be nulltype2
- the second type; may not be nulltype3
- the third type; may not be nullpublic static <T1,T2,T3,T4> TypeSystem.TypeFactory<Tuples.Tuple4<T1,T2,T3,T4>> typeFactory(TypeSystem.TypeFactory<T1> type1, TypeSystem.TypeFactory<T2> type2, TypeSystem.TypeFactory<T3> type3, TypeSystem.TypeFactory<T4> type4)
type1
- the first type; may not be nulltype2
- the second type; may not be nulltype3
- the third type; may not be nulltype4
- the fourth type; may not be nullpublic static TypeSystem.TypeFactory<?> typeFactory(Collection<TypeSystem.TypeFactory<?>> types)
types
- the collection of types for each slot in the tuplepublic static TypeSystem.TypeFactory<?> typeFactory(TypeSystem.TypeFactory<?> type, int tupleSize)
type
- the type of each/every slot in the tuplestupleSize
- the size of the tuplespublic static <T1,T2> org.mapdb.Serializer<Tuples.Tuple2<T1,T2>> serializer(org.mapdb.Serializer<T1> first, org.mapdb.Serializer<T2> second)
Serializer
for tuples of size 2.first
- the serializer for the first slotsecond
- the serializer for the second slotpublic static <T1,T2,T3> org.mapdb.Serializer<Tuples.Tuple3<T1,T2,T3>> serializer(org.mapdb.Serializer<T1> first, org.mapdb.Serializer<T2> second, org.mapdb.Serializer<T3> third)
Serializer
for tuples of size 3.first
- the serializer for the first slotsecond
- the serializer for the second slotthird
- the serializer for the third slotpublic static <T1,T2,T3,T4> org.mapdb.Serializer<Tuples.Tuple4<T1,T2,T3,T4>> serializer(org.mapdb.Serializer<T1> first, org.mapdb.Serializer<T2> second, org.mapdb.Serializer<T3> third, org.mapdb.Serializer<T4> fourth)
Serializer
for tuples of size 4.first
- the serializer for the first slotsecond
- the serializer for the second slotthird
- the serializer for the third slotfourth
- the serializer for the fourth slotpublic static org.mapdb.Serializer<Tuples.TupleN> serializer(org.mapdb.Serializer<?>[] serializers)
Serializer
for n-ary tuplesserializers
- the serializers for each slot in the tuplespublic static org.mapdb.Serializer<?> serializer(org.mapdb.Serializer<?> serializer, int tupleSize)
Serializer
for uniform tuples.serializer
- the serializer of each/every slot in the tuplestupleSize
- the size of the tuplesCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.