public class Identity extends BaseOperation<Identity.Functor> implements Function<Identity.Functor>
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.
Modifier and Type | Class and Description |
---|---|
protected static interface |
Identity.Functor |
fieldDeclaration, numArgs, trace
Constructor and Description |
---|
Identity()
Constructor Identity creates a new Identity instance that will pass the argument values to its output.
|
Identity(java.lang.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,
java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
java.lang.reflect.Type[] |
getTypes() |
int |
hashCode() |
void |
operate(FlowProcess flowProcess,
FunctionCall<Identity.Functor> functionCall)
Method operate provides the implementation of this Function.
|
void |
prepare(FlowProcess flowProcess,
OperationCall<Identity.Functor> operationCall)
Method prepare does nothing, and may safely be overridden.
|
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe
public Identity()
@ConstructorProperties(value="types") public Identity(java.lang.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, java.lang.Class... types)
fieldDeclaration
- of type Fieldstypes
- of type Class...public java.lang.reflect.Type[] getTypes()
public void prepare(FlowProcess flowProcess, OperationCall<Identity.Functor> operationCall)
BaseOperation
prepare
in interface Operation<Identity.Functor>
prepare
in class BaseOperation<Identity.Functor>
public void operate(FlowProcess flowProcess, FunctionCall<Identity.Functor> functionCall)
Function
operate
in interface Function<Identity.Functor>
flowProcess
- of type FlowProcessfunctionCall
- of type FunctionCallpublic boolean equals(java.lang.Object object)
equals
in class BaseOperation<Identity.Functor>
public int hashCode()
hashCode
in class BaseOperation<Identity.Functor>
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.