|
|||||||||
| 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 instances.
| Field Summary | |
|---|---|
static Tuple |
NULL
A constant empty Tuple instance. |
| Constructor Summary | |
|---|---|
Tuples()
|
|
| Method Summary | |
|---|---|
static Object[] |
asArray(Tuple tuple,
Class[] types)
Method asArray convert the given Tuple instance into an Object[]. |
static Object[] |
asArray(Tuple tuple,
Class[] types,
Object[] destination)
Method asArray convert the given Tuple instance into an Object[]. |
static Tuple |
coerce(Tuple tuple,
Class[] types)
Method coerce forces each element value in the given Tuple to the corresponding primitive type. |
static Object |
coerce(Tuple tuple,
int pos,
Class type)
Method coerce returns the value in the tuple at the given position to the requested type. |
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 Tuple |
setOnEmpty(TupleEntry baseEntry,
TupleEntry valuesEntry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Tuple NULL
| Constructor Detail |
|---|
public Tuples()
| Method Detail |
|---|
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[]
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 coerce(Tuple tuple,
int pos,
Class type)
tuple - of type Tuplepos - of type inttype - of type Class
public static Tuple coerce(Tuple tuple,
Class[] types)
tuple - of type Tupletypes - of type Class[]
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 setOnEmpty(TupleEntry baseEntry,
TupleEntry valuesEntry)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||