Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cascading.operation.function
Class SetValue

    java.lang.Object
      cascading.operation.BaseOperation
          cascading.operation.function.SetValue

All Implemented Interfaces:
  Function, Operation, Serializable

    public class SetValue

extends BaseOperation
implements Function

Class SetValue is a utility `Function` that allows for a Tuple value to be returned based on the outcome of a given `Filter` operation.

There are only two possible values, either `Filter.isRemove(cascading.flow.FlowProcess, cascading.operation.FilterCall)` returns `true` or `false`.

If `false` is returned, most commonly the `Filter` passed and the Tuple should be kept. SetValue will then return the first value in the given values array, by default `true`. If the Filter returns `true`, the second value in the values array will be returned, by default `false`.

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
`SetValue(Fields fieldDeclaration, Filter filter)` Constructor SetValue creates a new SetValue instance.
`SetValue(Fields fieldDeclaration, Filter filter, Serializable firstValue, Serializable secondValue)` Constructor SetValue creates a new SetValue instance.

Method Summary
`void` | `cleanup(FlowProcess flowProcess, OperationCall operationCall)` Method cleanup does nothing, and may safely be overridden.
`boolean` | `equals(Object object)`
`Serializable` | `getFirstValue()`
`Serializable` | `getSecondValue()`
`int` | `hashCode()`
`void` | `operate(FlowProcess flowProcess, FunctionCall functionCall)` Method operate provides the implementation of this Function.
`void` | `prepare(FlowProcess flowProcess, OperationCall operationCall)` Method prepare does nothing, and may safely be overridden.

Methods inherited from class cascading.operation.BaseOperation
`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
`flush, getFieldDeclaration, getNumArgs, isSafe`

Constructor Detail

### SetValue

    @ConstructorProperties(value={"fieldDeclaration","filter"})
    public SetValue(Fields fieldDeclaration,
                                               Filter filter)

  Constructor SetValue creates a new SetValue instance.

  Parameters:
    `fieldDeclaration` - of type Fields
    `filter` - of type Filter

### SetValue

    @ConstructorProperties(value={"fieldDeclaration","filter","firstValue","secondValue"})
    public SetValue(Fields fieldDeclaration,
                                               Filter filter,
                                               Serializable firstValue,
                                               Serializable secondValue)

  Constructor SetValue creates a new SetValue instance.

  Parameters:
    `fieldDeclaration` - of type Fields
    `filter` - of type Filter
    `firstValue` - of type Serializable
    `secondValue` - of type Serializable

Method Detail

### getFirstValue

    public Serializable getFirstValue()

### getSecondValue

    public Serializable getSecondValue()

### prepare

    public void prepare(FlowProcess flowProcess,
                        OperationCall operationCall)

  Description copied from class: `BaseOperation`
  Method prepare does nothing, and may safely be overridden.

  Specified by:
    `prepare` in interface `Operation`
  Overrides:
    `prepare` in class `BaseOperation`

### 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

### cleanup

    public void cleanup(FlowProcess flowProcess,
                        OperationCall operationCall)

  Description copied from class: `BaseOperation`
  Method cleanup does nothing, and may safely be overridden.

  Specified by:
    `cleanup` in interface `Operation`
  Overrides:
    `cleanup` in class `BaseOperation`

### equals

    public boolean equals(Object object)

  Overrides:
    `equals` in class `BaseOperation`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `BaseOperation`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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