|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.operation.BaseOperation<cascading.operation.Identity.Functor>
cascading.operation.Identity
public class Identity
The Identity function simply passes incoming arguments back out again. Optionally argument fields can be renamed, and/or coerced into specific types.
During coercion, if the given type is a primitive (long
), and the tuple value is null, 0
is returned.
If the type is an Object (java.lang.Long
), and the tuple value is null
, null
is returned.
Field Summary |
---|
Fields inherited from class cascading.operation.BaseOperation |
---|
fieldDeclaration, numArgs, trace |
Fields inherited from interface cascading.operation.Operation |
---|
ANY |
Constructor Summary | |
---|---|
Identity()
Constructor Identity creates a new Identity instance that will pass the argument values to its output. |
|
Identity(Class... types)
Constructor Identity creates a new Identity instance that will coerce the values to the give types. |
|
Identity(Fields fieldDeclaration)
Constructor Identity creates a new Identity instance that will rename the argument fields to the given fieldDeclaration. |
|
Identity(Fields fieldDeclaration,
Class... types)
Constructor Identity creates a new Identity instance that will rename the argument fields to the given fieldDeclaration, and coerce the values to the give types. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
Type[] |
getTypes()
|
int |
hashCode()
|
void |
operate(FlowProcess flowProcess,
FunctionCall<cascading.operation.Identity.Functor> functionCall)
Method operate provides the implementation of this Function. |
void |
prepare(FlowProcess flowProcess,
OperationCall<cascading.operation.Identity.Functor> operationCall)
Method prepare does nothing, and may safely be overridden. |
Methods inherited from class cascading.operation.BaseOperation |
---|
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface cascading.operation.Operation |
---|
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe |
Constructor Detail |
---|
public Identity()
@ConstructorProperties(value="types") public Identity(Class... types)
types
- of type Class...@ConstructorProperties(value="fieldDeclaration") public Identity(Fields fieldDeclaration)
fieldDeclaration
- of type Fields@ConstructorProperties(value={"fieldDeclaration","types"}) public Identity(Fields fieldDeclaration, Class... types)
fieldDeclaration
- of type Fieldstypes
- of type Class...Method Detail |
---|
public Type[] getTypes()
public void prepare(FlowProcess flowProcess, OperationCall<cascading.operation.Identity.Functor> operationCall)
BaseOperation
prepare
in interface Operation<cascading.operation.Identity.Functor>
prepare
in class BaseOperation<cascading.operation.Identity.Functor>
public void operate(FlowProcess flowProcess, FunctionCall<cascading.operation.Identity.Functor> functionCall)
Function
operate
in interface Function<cascading.operation.Identity.Functor>
flowProcess
- of type FlowProcessfunctionCall
- of type FunctionCallpublic boolean equals(Object object)
equals
in class BaseOperation<cascading.operation.Identity.Functor>
public int hashCode()
hashCode
in class BaseOperation<cascading.operation.Identity.Functor>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |