public class Tuples extends Object
Tuple
and TupleEntry
instances.Tuple
,
TupleEntry
Constructor and Description |
---|
Tuples() |
Modifier and Type | Method and Description |
---|---|
static Object[] |
asArray(Tuple tuple,
CoercibleType[] coercions,
Class[] types,
Object[] destination) |
static <T> T[] |
asArray(Tuple tuple,
T[] destination)
Method asArray copies the elements of the given Tuple instance to the given Object array.
|
static Collection |
asCollection(Tuple tuple) |
static <T extends Tuple> |
asModifiable(T tuple)
Method asModifiable marks the given Tuple instance as modifiable.
|
static <T extends Tuple> |
asUnmodifiable(T tuple)
Method asUnmodifiable marks the given Tuple instance as unmodifiable.
|
static Tuple |
create(List<Object> arrayList) |
static Tuple |
extract(TupleEntry tupleEntry,
Fields selector)
Method extract creates a new Tuple from the given selector, but sets the values in the current tuple to null.
|
static Tuple |
extractTuple(TupleEntry tupleEntry,
Fields selector)
Method extractTuple returns a new Tuple based on the given selector.
|
static int |
frequency(TupleEntry tupleEntry,
Object value)
Method frequency behaves the same as
Collections.frequency(java.util.Collection, Object) . |
static int |
frequency(Tuple tuple,
Object value)
Method frequency behaves the same as
Collections.frequency(java.util.Collection, Object) . |
static Tuple |
nulledCopy(Fields declarator,
Tuple tuple,
Fields selector) |
static Tuple |
nulledCopy(TupleEntry tupleEntry,
Fields selector) |
static Tuple |
setOnEmpty(TupleEntry baseEntry,
TupleEntry valuesEntry) |
static <T extends Tuple> |
setUnmodifiable(T tuple,
boolean isUnmodifiable) |
static Tuple |
tuple(Object a)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c,
Object d)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c,
Object d,
Object e)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c,
Object d,
Object e,
Object f)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c,
Object d,
Object e,
Object f,
Object g)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(Object a,
Object b,
Object c,
Object d,
Object e,
Object f,
Object g,
Object h)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
public Tuples()
public static Tuple tuple(Object a)
a
- of type Objectpublic static Tuple tuple(Object a, Object b)
a
- of type Objectb
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c)
a
- of type Objectb
- of type Objectc
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c, Object d)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c, Object d, Object e)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c, Object d, Object e, Object f)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectf
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c, Object d, Object e, Object f, Object g)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectf
- of type Objectg
- of type Objectpublic static Tuple tuple(Object a, Object b, Object c, Object d, Object e, Object f, Object g, Object h)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectf
- of type Objectg
- of type Objecth
- of type Objectpublic static <T> T[] asArray(Tuple tuple, T[] destination)
tuple
- of type Tupledestination
- of type Object[]public static Object[] asArray(Tuple tuple, CoercibleType[] coercions, Class[] types, Object[] destination)
public static Collection asCollection(Tuple tuple)
public static int frequency(Tuple tuple, Object value)
Collections.frequency(java.util.Collection, Object)
.
This method is a convenient way to test for all null values in a tuple.tuple
- of type Tuplevalue
- of type Objectpublic static int frequency(TupleEntry tupleEntry, Object value)
Collections.frequency(java.util.Collection, Object)
.
This method is a convenient way to test for all null values in a tuple.tupleEntry
- of type TupleEntryvalue
- of type Objectpublic static Tuple extractTuple(TupleEntry tupleEntry, Fields selector)
tupleEntry
- of type TupleEntryselector
- of type Fieldspublic static Tuple extract(TupleEntry tupleEntry, Fields selector)
tupleEntry
- of type TupleEntryselector
- of type Fieldspublic static Tuple nulledCopy(TupleEntry tupleEntry, Fields selector)
public static Tuple nulledCopy(Fields declarator, Tuple tuple, Fields selector)
public static Tuple setOnEmpty(TupleEntry baseEntry, TupleEntry valuesEntry)
public static <T extends Tuple> T asUnmodifiable(T tuple)
tuple
- of type Tuplepublic static <T extends Tuple> T asModifiable(T tuple)
tuple
- of type Tuplepublic static <T extends Tuple> T setUnmodifiable(T tuple, boolean isUnmodifiable)
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.