cascading.pipe
Class Each

java.lang.Object
  extended by cascading.pipe.Pipe
      extended by cascading.pipe.Operator
          extended by cascading.pipe.Each
All Implemented Interfaces:
FlowElement, Serializable

public class Each
extends Operator

The Each operator applies either a Function or a Filter to each entry in the Tuple stream. Any number of Each operators can follow an Each, Group, or Every operator.

See Also:
Serialized Form

Nested Class Summary
 class Each.EachAssertionHandler
           
 class Each.EachFilterHandler
           
 class Each.EachFunctionHandler
           
 class Each.EachHandler
          Class EachHandler is a helper class that wraps Each instances.
 
Field Summary
 
Fields inherited from class cascading.pipe.Operator
argumentSelector, assertionLevel, operation, outputSelector
 
Fields inherited from class cascading.pipe.Pipe
previous
 
Constructor Summary
Each(Pipe previous, AssertionLevel assertionLevel, Assertion assertion)
           
Each(Pipe previous, Fields argumentFieldSelector, AssertionLevel assertionLevel, Assertion assertion)
           
Each(Pipe pipe, Fields argumentFieldSelector, Filter filter)
           
Each(Pipe pipe, Fields argumentFieldSelector, Function function)
          Only pass arguementFields to the given function, only return fields declared by the function.
Each(Pipe pipe, Fields argumentFieldSelector, Function function, Fields outFieldSelector)
          Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.
Each(Pipe previous, Filter filter)
           
Each(Pipe previous, Function function)
          Pass all fields to the given function, only return fields declared by the function.
Each(Pipe pipe, Function function, Fields outFieldSelector)
          Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.
Each(String name, AssertionLevel assertionLevel, Assertion assertion)
          Constructor Each creates a new Each instance.
Each(String name, Fields argumentFieldSelector, AssertionLevel assertionLevel, Assertion assertion)
           
Each(String name, Fields argumentFieldSelector, Filter filter)
           
Each(String name, Fields argumentFieldSelector, Function function)
          Only pass arguementFields to the given function, only return fields declared by the function.
Each(String name, Fields argumentFieldSelector, Function function, Fields outFieldSelector)
          Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.
Each(String name, Filter filter)
          Constructor Each creates a new Each instance.
Each(String name, Function function)
          Pass all fields to the given function, only return fields declared by the function.
Each(String name, Function function, Fields outFieldSelector)
          Only return fields selected by the outFieldsSelector.
 
Method Summary
 Each.EachHandler getHandler(FlowCollector flowCollector, Scope scope)
           
 Scope outgoingScopeFor(Set<Scope> incomingScopes)
          Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.
 Fields resolveFields(Scope scope)
          Method resolveFields returns the actual field names represented by the given Scope.
 Fields resolveIncomingOperationFields(Scope incomingScope)
          Method resolveIncomingOperationFields resolves the incoming scopes to the actual incoming operation field names.
protected  void verifyOperation()
           
 
Methods inherited from class cascading.pipe.Operator
equals, getArgumentSelector, getAssertionLevel, getFieldDeclaration, getOperation, getOutputSelector, hashCode, isAssertion, makeResult, printInternal, toString
 
Methods inherited from class cascading.pipe.Pipe
getHeads, getName, getPrevious, getTrace, pipes, print
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Each

public Each(String name,
            Function function)
Pass all fields to the given function, only return fields declared by the function.

Parameters:
name - of type String
function - of type Function

Each

public Each(String name,
            Fields argumentFieldSelector,
            Function function)
Only pass arguementFields to the given function, only return fields declared by the function.

Parameters:
name - of type String
argumentFieldSelector - of type Fields
function - of type Function

Each

public Each(String name,
            Fields argumentFieldSelector,
            Function function,
            Fields outFieldSelector)
Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.

Parameters:
name - of type String
argumentFieldSelector - of type Fields
function - of type Function
outFieldSelector - of type Fields

Each

public Each(String name,
            Function function,
            Fields outFieldSelector)
Only return fields selected by the outFieldsSelector.

Parameters:
name - of type String
function - of type Function
outFieldSelector - of type Fields

Each

public Each(Pipe previous,
            Function function)
Pass all fields to the given function, only return fields declared by the function.

Parameters:
previous - of type Pipe
function - of type Function

Each

public Each(Pipe pipe,
            Fields argumentFieldSelector,
            Function function)
Only pass arguementFields to the given function, only return fields declared by the function.

Parameters:
pipe - of type Pipe
argumentFieldSelector - of type Fields
function - of type Function

Each

public Each(Pipe pipe,
            Fields argumentFieldSelector,
            Function function,
            Fields outFieldSelector)
Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.

Parameters:
pipe - of type Pipe
argumentFieldSelector - of type Fields
function - of type Function
outFieldSelector - of type Fields

Each

public Each(Pipe pipe,
            Function function,
            Fields outFieldSelector)
Only pass arguementFields to the given function, only return fields selected by the outFieldsSelector.

Parameters:
pipe - of type Pipe
function - of type Function
outFieldSelector - of type Fields

Each

public Each(String name,
            Filter filter)
Constructor Each creates a new Each instance.

Parameters:
name - of type String
filter - of type Filter

Each

public Each(String name,
            Fields argumentFieldSelector,
            Filter filter)
Parameters:
name - of type String
argumentFieldSelector - of type Fields
filter - of type Filter

Each

public Each(Pipe previous,
            Filter filter)
Parameters:
previous - of type Pipe
filter - of type Filter

Each

public Each(Pipe pipe,
            Fields argumentFieldSelector,
            Filter filter)
Parameters:
pipe - of type Pipe
argumentFieldSelector - of type Fields
filter - of type Filter

Each

public Each(String name,
            AssertionLevel assertionLevel,
            Assertion assertion)
Constructor Each creates a new Each instance.

Parameters:
name - of type String
assertionLevel - of type AssertionLevel
assertion - of type Filter

Each

public Each(String name,
            Fields argumentFieldSelector,
            AssertionLevel assertionLevel,
            Assertion assertion)
Parameters:
name - of type String
argumentFieldSelector - of type Fields
assertionLevel - of type AssertionLevel
assertion - of type Filter

Each

public Each(Pipe previous,
            AssertionLevel assertionLevel,
            Assertion assertion)
Parameters:
previous - of type Pipe
assertionLevel - of type AssertionLevel
assertion - of type Filter

Each

public Each(Pipe previous,
            Fields argumentFieldSelector,
            AssertionLevel assertionLevel,
            Assertion assertion)
Parameters:
previous - of type Pipe
argumentFieldSelector - of type Fields
assertionLevel - of type AssertionLevel
assertion - of type Filter
Method Detail

verifyOperation

protected void verifyOperation()
Overrides:
verifyOperation in class Operator

resolveIncomingOperationFields

public Fields resolveIncomingOperationFields(Scope incomingScope)
Description copied from interface: FlowElement
Method resolveIncomingOperationFields resolves the incoming scopes to the actual incoming operation field names.

Specified by:
resolveIncomingOperationFields in interface FlowElement
Overrides:
resolveIncomingOperationFields in class Pipe
Parameters:
incomingScope - of type Scope
Returns:
Fields
See Also:
FlowElement.resolveIncomingOperationFields(Scope)

resolveFields

public Fields resolveFields(Scope scope)
Description copied from interface: FlowElement
Method resolveFields returns the actual field names represented by the given Scope. The scope may be incoming or outgoing in relation to this FlowElement instance.

Specified by:
resolveFields in interface FlowElement
Overrides:
resolveFields in class Pipe
Parameters:
scope - of type Scope
Returns:
Fields
See Also:
FlowElement.resolveFields(Scope)

outgoingScopeFor

public Scope outgoingScopeFor(Set<Scope> incomingScopes)
Description copied from interface: FlowElement
Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.

Specified by:
outgoingScopeFor in interface FlowElement
Specified by:
outgoingScopeFor in class Operator
Parameters:
incomingScopes - of type Set
Returns:
Scope
See Also:
Operator#outgoingScopeFor(Set)

getHandler

public Each.EachHandler getHandler(FlowCollector flowCollector,
                                   Scope scope)


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