public class Tuples extends java.lang.Object
Tuple
and TupleEntry
instances.Tuple
,
TupleEntry
Constructor and Description |
---|
Tuples() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
asArray(Tuple tuple,
CoercibleType[] coercions,
java.lang.Class[] types,
java.lang.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 java.util.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(java.util.List<java.lang.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,
java.lang.Object value)
Method frequency behaves the same as
Collections.frequency(java.util.Collection, Object) . |
static int |
frequency(Tuple tuple,
java.lang.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(java.lang.Object a)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c,
java.lang.Object d)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c,
java.lang.Object d,
java.lang.Object e)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c,
java.lang.Object d,
java.lang.Object e,
java.lang.Object f)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c,
java.lang.Object d,
java.lang.Object e,
java.lang.Object f,
java.lang.Object g)
A utility function for use with Janino expressions to get around its lack of support for varargs.
|
static Tuple |
tuple(java.lang.Object a,
java.lang.Object b,
java.lang.Object c,
java.lang.Object d,
java.lang.Object e,
java.lang.Object f,
java.lang.Object g,
java.lang.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(java.lang.Object a)
a
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b)
a
- of type Objectb
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b, java.lang.Object c)
a
- of type Objectb
- of type Objectc
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e, java.lang.Object f)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Objecte
- of type Objectf
- of type Objectpublic static Tuple tuple(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e, java.lang.Object f, java.lang.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(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e, java.lang.Object f, java.lang.Object g, java.lang.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 java.lang.Object[] asArray(Tuple tuple, CoercibleType[] coercions, java.lang.Class[] types, java.lang.Object[] destination)
public static java.util.Collection asCollection(Tuple tuple)
public static int frequency(Tuple tuple, java.lang.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, java.lang.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 Xplenty, Inc. All Rights Reserved.