cascading.pipe

## Class Each

- java.lang.Object
- - cascading.pipe.Pipe
  - - cascading.pipe.Operator
    - - cascading.pipe.Each

- All Implemented Interfaces:
    FlowElement, ScopedElement, Traceable, java.io.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, `Splice`, or `Every` operator.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class cascading.pipe.Operator

      `argumentSelector, operation, outputSelector, plannerLevel`

    - ### Fields inherited from class cascading.pipe.Pipe

      `configDef, name, nodeConfigDef, parent, previous, stepConfigDef`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Each(Pipe previous, AssertionLevel assertionLevel, Assertion assertion)`
    `Each(Pipe previous, DebugLevel debugLevel, Debug debug)`
    `Each(Pipe previous, Fields argumentSelector, AssertionLevel assertionLevel, Assertion assertion)`
    `Each(Pipe previous, Fields argumentSelector, DebugLevel debugLevel, Debug debug)`
    `Each(Pipe previous, Fields argumentSelector, Filter filter)` Constructor Each creates a new Each instance.
    `Each(Pipe previous, Fields argumentSelector, Function function)` Only pass argumentFields to the given function, only return fields declared by the function.
    `Each(Pipe previous, Fields argumentSelector, Function function, Fields outputSelector)` Only pass argumentFields to the given function, only return fields selected by the outputSelector.
    `Each(Pipe previous, Filter filter)` Constructor Each creates a new Each instance.
    `Each(Pipe previous, Function function)` Pass all fields to the given function, only return fields declared by the function.
    `Each(Pipe previous, Function function, Fields outputSelector)` Only pass argumentFields to the given function, only return fields selected by the outputSelector.
    `Each(java.lang.String name, AssertionLevel assertionLevel, Assertion assertion)` Constructor Each creates a new Each instance.
    `Each(java.lang.String name, Fields argumentSelector, AssertionLevel assertionLevel, Assertion assertion)`
    `Each(java.lang.String name, Fields argumentSelector, DebugLevel debugLevel, Debug debug)`
    `Each(java.lang.String name, Fields argumentSelector, Filter filter)` Constructor Each creates a new Each instance.
    `Each(java.lang.String name, Fields argumentSelector, Function function)` Only pass argumentFields to the given function, only return fields declared by the function.
    `Each(java.lang.String name, Fields argumentSelector, Function function, Fields outputSelector)` Only pass argumentFields to the given function, only return fields selected by the outputSelector.
    `Each(java.lang.String name, Filter filter)` Constructor Each creates a new Each instance.
    `Each(java.lang.String name, Function function)` Pass all fields to the given function, only return fields declared by the function.
    `Each(java.lang.String name, Function function, Fields outputSelector)` Only return fields selected by the outputSelector.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Filter` | `getFilter()`
    `Function` | `getFunction()`
    `ValueAssertion` | `getValueAssertion()`
    `boolean` | `isFilter()`
    `boolean` | `isFunction()`
    `boolean` | `isValueAssertion()`
    `Scope` | `outgoingScopeFor(java.util.Set<Scope> incomingScopes)` Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.
    `Fields` | `resolveIncomingOperationArgumentFields(Scope incomingScope)` Method resolveIncomingOperationArgumentFields returns the Fields outgoing from the previous FlowElement that are consumable by this FlowElement when preparing Operation arguments.
    `Fields` | `resolveIncomingOperationPassThroughFields(Scope incomingScope)` Method resolveIncomingOperationPassThroughFields returns the Fields outgoing from the previous FlowElement that are consumable by this FlowElement when preparing the Pipe outgoing tuple.
    `protected void` | `verifyOperation()`

    - ### Methods inherited from class cascading.pipe.Operator

      `equals, getArgumentSelector, getFieldDeclaration, getOperation, getOutputSelector, getPlannerLevel, hashCode, hasPlannerLevel, printInternal, resolveRemainderFields, toString`

    - ### Methods inherited from class cascading.pipe.Pipe

      `getConfigDef, getHeads, getName, getNodeConfigDef, getParent, getPrevious, getStepConfigDef, getTrace, hasConfigDef, hasNodeConfigDef, hasStepConfigDef, id, named, names, pipes, print, setParent`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Each

          @ConstructorProperties(value={"name","function"})
          public Each(java.lang.String name,
                                    Function function)

      Pass all fields to the given function, only return fields declared by the function.
      Parameters:
        `name` - name for this branch of Pipes
        `function` - Function to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","argumentSelector","function"})
          public Each(java.lang.String name,
                                    Fields argumentSelector,
                                    Function function)

      Only pass argumentFields to the given function, only return fields declared by the function.
      Parameters:
        `name` - name for this branch of Pipes
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `function` - Function to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","argumentSelector","function","outputSelector"})
          public Each(java.lang.String name,
                                    Fields argumentSelector,
                                    Function function,
                                    Fields outputSelector)

      Only pass argumentFields to the given function, only return fields selected by the outputSelector.
      Parameters:
        `name` - name for this branch of Pipes
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `function` - Function to be applied to each input Tuple
        `outputSelector` - field selector that selects the output Tuple from the input and Function results Tuples

    - #### Each

          @ConstructorProperties(value={"name","function","outputSelector"})
          public Each(java.lang.String name,
                                    Function function,
                                    Fields outputSelector)

      Only return fields selected by the outputSelector.
      Parameters:
        `name` - name for this branch of Pipes
        `function` - Function to be applied to each input Tuple
        `outputSelector` - field selector that selects the output Tuple from the input and Function results Tuples

    - #### Each

          @ConstructorProperties(value={"previous","function"})
          public Each(Pipe previous,
                                    Function function)

      Pass all fields to the given function, only return fields declared by the function.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `function` - Function to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","argumentSelector","function"})
          public Each(Pipe previous,
                                    Fields argumentSelector,
                                    Function function)

      Only pass argumentFields to the given function, only return fields declared by the function.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `function` - Function to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","argumentSelector","function","outputSelector"})
          public Each(Pipe previous,
                                    Fields argumentSelector,
                                    Function function,
                                    Fields outputSelector)

      Only pass argumentFields to the given function, only return fields selected by the outputSelector.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `function` - Function to be applied to each input Tuple
        `outputSelector` - field selector that selects the output Tuple from the input and Function results Tuples

    - #### Each

          @ConstructorProperties(value={"previous","function","outputSelector"})
          public Each(Pipe previous,
                                    Function function,
                                    Fields outputSelector)

      Only pass argumentFields to the given function, only return fields selected by the outputSelector.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `function` - Function to be applied to each input Tuple
        `outputSelector` - field selector that selects the output Tuple from the input and Function results Tuples

    - #### Each

          @ConstructorProperties(value={"name","filter"})
          public Each(java.lang.String name,
                                    Filter filter)

      Constructor Each creates a new Each instance.
      Parameters:
        `name` - name for this branch of Pipes
        `filter` - Filter to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","argumentSelector","filter"})
          public Each(java.lang.String name,
                                    Fields argumentSelector,
                                    Filter filter)

      Constructor Each creates a new Each instance.
      Parameters:
        `name` - name for this branch of Pipes
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `filter` - Filter to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","filter"})
          public Each(Pipe previous,
                                    Filter filter)

      Constructor Each creates a new Each instance.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `filter` - Filter to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","argumentSelector","filter"})
          public Each(Pipe previous,
                                    Fields argumentSelector,
                                    Filter filter)

      Constructor Each creates a new Each instance.
      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `filter` - Filter to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","assertionLevel","assertion"})
          public Each(java.lang.String name,
                                    AssertionLevel assertionLevel,
                                    Assertion assertion)

      Constructor Each creates a new Each instance.
      Parameters:
        `name` - name for this branch of Pipes
        `assertionLevel` - AssertionLevel to associate with the Assertion
        `assertion` - Assertion to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","argumentSelector","assertionLevel","assertion"})
          public Each(java.lang.String name,
                                    Fields argumentSelector,
                                    AssertionLevel assertionLevel,
                                    Assertion assertion)

      Parameters:
        `name` - name for this branch of Pipes
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `assertionLevel` - AssertionLevel to associate with the Assertion
        `assertion` - Assertion to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","assertionLevel","assertion"})
          public Each(Pipe previous,
                                    AssertionLevel assertionLevel,
                                    Assertion assertion)

      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `assertionLevel` - AssertionLevel to associate with the Assertion
        `assertion` - Assertion to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","argumentSelector","assertionLevel","assertion"})
          public Each(Pipe previous,
                                    Fields argumentSelector,
                                    AssertionLevel assertionLevel,
                                    Assertion assertion)

      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `assertionLevel` - AssertionLevel to associate with the Assertion
        `assertion` - Assertion to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"name","argumentSelector","debugLevel","debug"})
          public Each(java.lang.String name,
                                    Fields argumentSelector,
                                    DebugLevel debugLevel,
                                    Debug debug)

      Parameters:
        `name` - name for this branch of Pipes
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `debugLevel` - DebugLevel to associate with the Debug
        `debug` - Debug to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","debugLevel","debug"})
          public Each(Pipe previous,
                                    DebugLevel debugLevel,
                                    Debug debug)

      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `debugLevel` - DebugLevel to associate with the Debug
        `debug` - Debug to be applied to each input Tuple

    - #### Each

          @ConstructorProperties(value={"previous","argumentSelector","debugLevel","debug"})
          public Each(Pipe previous,
                                    Fields argumentSelector,
                                    DebugLevel debugLevel,
                                    Debug debug)

      Parameters:
        `previous` - previous Pipe to receive input Tuples from
        `argumentSelector` - field selector that selects Function arguments from the input Tuple
        `debugLevel` - DebugLevel to associate with the Debug
        `debug` - Debug to be applied to each input Tuple

  - ### Method Detail

    - #### verifyOperation

          protected void verifyOperation()

      Overrides:
        `verifyOperation` in class `Operator`

    - #### getFunction

          public Function getFunction()

    - #### getFilter

          public Filter getFilter()

    - #### getValueAssertion

          public ValueAssertion getValueAssertion()

    - #### isFunction

          public boolean isFunction()

    - #### isFilter

          public boolean isFilter()

    - #### isValueAssertion

          public boolean isValueAssertion()

    - #### resolveIncomingOperationArgumentFields

          public Fields resolveIncomingOperationArgumentFields(Scope incomingScope)

      Description copied from interface: `ScopedElement`
      Method resolveIncomingOperationArgumentFields returns the Fields outgoing from the previous FlowElement that are consumable by this FlowElement when preparing Operation arguments.
      Specified by:
        `resolveIncomingOperationArgumentFields` in interface `ScopedElement`
      Overrides:
        `resolveIncomingOperationArgumentFields` in class `Pipe`
      Parameters:
        `incomingScope` - of type Scope
      Returns:
        Fields

    - #### resolveIncomingOperationPassThroughFields

          public Fields resolveIncomingOperationPassThroughFields(Scope incomingScope)

      Description copied from interface: `ScopedElement`
      Method resolveIncomingOperationPassThroughFields returns the Fields outgoing from the previous FlowElement that are consumable by this FlowElement when preparing the Pipe outgoing tuple.
      Specified by:
        `resolveIncomingOperationPassThroughFields` in interface `ScopedElement`
      Overrides:
        `resolveIncomingOperationPassThroughFields` in class `Pipe`
      Parameters:
        `incomingScope` - of type Scope
      Returns:
        Fields

    - #### outgoingScopeFor

          public Scope outgoingScopeFor(java.util.Set<Scope> incomingScopes)

      Description copied from interface: `ScopedElement`
      Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement.
      Specified by:
        `outgoingScopeFor` in interface `ScopedElement`
      Specified by:
        `outgoingScopeFor` in class `Operator`
      Parameters:
        `incomingScopes` - of type Set
      Returns:
        Scope

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.