|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.tuple.Tuples
public class Tuples
Class Tuples is a helper class providing common methods to manipulate Tuple
and TupleEntry
instances.
Tuple
,
TupleEntry
Constructor Summary | |
---|---|
Tuples()
|
Method Summary | ||
---|---|---|
static Object[] |
asArray(Tuple tuple,
Class[] types)
Deprecated. |
|
static Object[] |
asArray(Tuple tuple,
Class[] types,
Object[] destination)
Deprecated. |
|
static Object[] |
asArray(Tuple tuple,
CoercibleType[] coercions,
Class[] types,
Object[] destination)
|
|
static
|
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 Tuple |
asModifiable(Tuple tuple)
Method asModifiable marks the given Tuple instance as modifiable. |
|
static Tuple |
asUnmodifiable(Tuple tuple)
Method asUnmodifiable marks the given Tuple instance as unmodifiable. |
|
static Object |
coerce(Object value,
Class type)
Deprecated. |
|
static Tuple |
coerce(Tuple tuple,
Class[] types)
Deprecated. |
|
static Tuple |
coerce(Tuple tuple,
Class[] types,
Tuple destination)
Deprecated. |
|
static Object |
coerce(Tuple tuple,
int pos,
Class type)
Deprecated. |
|
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 Tuple |
setUnmodifiable(Tuple tuple,
boolean isUnmodifiable)
|
|
static boolean |
toBoolean(Object value)
Deprecated. |
|
static Boolean |
toBooleanObject(Object value)
Deprecated. |
|
static double |
toDouble(Object value)
Deprecated. |
|
static Double |
toDoubleObject(Object value)
Deprecated. |
|
static float |
toFloat(Object value)
Deprecated. |
|
static Float |
toFloatObject(Object value)
Deprecated. |
|
static int |
toInteger(Object value)
Deprecated. |
|
static Integer |
toIntegerObject(Object value)
Deprecated. |
|
static long |
toLong(Object value)
Deprecated. |
|
static Long |
toLongObject(Object value)
Deprecated. |
|
static short |
toShort(Object value)
Deprecated. |
|
static Short |
toShortObject(Object value)
Deprecated. |
|
static String |
toString(Object value)
Deprecated. |
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tuples()
Method Detail |
---|
public static Tuple tuple(Object a)
a
- of type Object
public static Tuple tuple(Object a, Object b)
a
- of type Objectb
- of type Object
public static Tuple tuple(Object a, Object b, Object c)
a
- of type Objectb
- of type Objectc
- of type Object
public static Tuple tuple(Object a, Object b, Object c, Object d)
a
- of type Objectb
- of type Objectc
- of type Objectd
- of type Object
public 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 Object
public 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 Object
public 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 Object
public 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 Object
public static <T> T[] asArray(Tuple tuple, T[] destination)
tuple
- of type Tupledestination
- of type Object[]
@Deprecated public static Object[] asArray(Tuple tuple, Class[] types)
Tuple
instance into an Object[]. The given Class[] array
denotes the types each tuple element value should be coerced into.
Coercion types are Object, String, Integer, Long, Float, Double, Short, and Boolean.
If all Tuple element values are null, they will remain null for String and Object, but become zero for the numeric types.
The string value 'true' can be converted to the boolean true.
tuple
- of type Tupletypes
- of type Class[]
@Deprecated public static Object[] asArray(Tuple tuple, Class[] types, Object[] destination)
Tuple
instance into an Object[]. The given Class[] array
denotes the types each tuple element value should be coerced into.
tuple
- of type Tupletypes
- of type Class[]destination
- 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 Object
public 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 Object
@Deprecated public static Object coerce(Tuple tuple, int pos, Class type)
tuple
- of type Tuplepos
- of type inttype
- of type Class
@Deprecated public static Object coerce(Object value, Class type)
@Deprecated public static final String toString(Object value)
@Deprecated public static final int toInteger(Object value)
@Deprecated public static final long toLong(Object value)
@Deprecated public static final double toDouble(Object value)
@Deprecated public static final float toFloat(Object value)
@Deprecated public static final short toShort(Object value)
@Deprecated public static final boolean toBoolean(Object value)
@Deprecated public static final Integer toIntegerObject(Object value)
@Deprecated public static final Long toLongObject(Object value)
@Deprecated public static final Double toDoubleObject(Object value)
@Deprecated public static final Float toFloatObject(Object value)
@Deprecated public static final Short toShortObject(Object value)
@Deprecated public static final Boolean toBooleanObject(Object value)
@Deprecated public static Tuple coerce(Tuple tuple, Class[] types)
tuple
- of type Tupletypes
- of type Class[]
@Deprecated public static Tuple coerce(Tuple tuple, Class[] types, Tuple destination)
tuple
- of type Tupletypes
- of type Class[]destination
- of type Tuple
public static Tuple extractTuple(TupleEntry tupleEntry, Fields selector)
tupleEntry
- of type TupleEntryselector
- of type Fields
public static Tuple extract(TupleEntry tupleEntry, Fields selector)
tupleEntry
- of type TupleEntryselector
- of type Fields
public 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 Tuple asUnmodifiable(Tuple tuple)
tuple
- of type Tuple
public static Tuple asModifiable(Tuple tuple)
tuple
- of type Tuple
public static Tuple setUnmodifiable(Tuple tuple, boolean isUnmodifiable)
public static Tuple create(List<Object> arrayList)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |