cascading.operation
Class Identity

java.lang.Object
  extended by cascading.operation.BaseOperation
      extended by cascading.operation.Identity
All Implemented Interfaces:
Function, Operation, Serializable

public class Identity
extends BaseOperation
implements Function

The Identity function simply passes incoming arguments back out again. Optionally argument fields can be renamed, and/or coerced into specfic types.

See Also:
Serialized Form

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)
           
 int hashCode()
           
 void operate(FlowProcess flowProcess, FunctionCall functionCall)
          Method operate provides the implementation of this Function.
 
Methods inherited from class cascading.operation.BaseOperation
cleanup, getFieldDeclaration, getNumArgs, getTrace, isSafe, prepare, 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, getFieldDeclaration, getNumArgs, isSafe, prepare
 

Constructor Detail

Identity

public Identity()
Constructor Identity creates a new Identity instance that will pass the argument values to its output. Use this constructor for a simple copy Pipe.


Identity

@ConstructorProperties(value="types")
public Identity(Class... types)
Constructor Identity creates a new Identity instance that will coerce the values to the give types.

Parameters:
types - of type Class...

Identity

@ConstructorProperties(value="fieldDeclaration")
public Identity(Fields fieldDeclaration)
Constructor Identity creates a new Identity instance that will rename the argument fields to the given fieldDeclaration.

Parameters:
fieldDeclaration - of type Fields

Identity

@ConstructorProperties(value={"fieldDeclaration","types"})
public 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.

Parameters:
fieldDeclaration - of type Fields
types - of type Class...
Method Detail

operate

public void operate(FlowProcess flowProcess,
                    FunctionCall functionCall)
Description copied from interface: Function
Method operate provides the implementation of this Function.

Specified by:
operate in interface Function
Parameters:
flowProcess - of type FlowProcess
functionCall - of type FunctionCall
See Also:
Function.operate(cascading.flow.FlowProcess, FunctionCall)

equals

public boolean equals(Object object)
Overrides:
equals in class BaseOperation

hashCode

public int hashCode()
Overrides:
hashCode in class BaseOperation


Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.