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.state
Class Counter

    java.lang.Object
      cascading.operation.BaseOperation
          cascading.operation.state.Counter

All Implemented Interfaces:
  Filter, Operation, Serializable

    public class Counter

extends BaseOperation
implements Filter

Class Counter is a `Filter` that increments a given `Enum` counter by 1 or by the given `increment` value.

Internally, the `isRemove(cascading.flow.FlowProcess, cascading.operation.FilterCall)` method calls `FlowProcess.increment(Enum, long)`.

No `Tuple` instances are ever discarded.

See Also:
  `FlowProcess`, `Filter`, Serialized Form

Field Summary

Fields inherited from class cascading.operation.BaseOperation
`fieldDeclaration, numArgs, trace`

Fields inherited from interface cascading.operation.Operation
`ANY`

Constructor Summary
`Counter(Enum counter)` Constructor Counter creates a new Counter instance.
`Counter(Enum counter, int increment)` Constructor Counter creates a new Counter instance.
`Counter(String group, String counter)`
`Counter(String group, String counter, int increment)`

Method Summary
`boolean` | `equals(Object object)`
`Enum` | `getCounterEnum()`
`String` | `getCounterString()`
`String` | `getGroupString()`
`int` | `getIncrement()`
`int` | `hashCode()`
`boolean` | `isRemove(FlowProcess flowProcess, FilterCall filterCall)` Method isRemove returns true if input should be removed from the tuple stream.

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

Constructor Detail

### Counter

    @ConstructorProperties(value="counter")
    public Counter(Enum counter)

  Constructor Counter creates a new Counter instance.

  Parameters:
    `counter` - of type Enum

### Counter

    @ConstructorProperties(value={"counter","increment"})
    public Counter(Enum counter,
                                              int increment)

  Constructor Counter creates a new Counter instance.

  Parameters:
    `counter` - of type Enum
    `increment` - of type int

### Counter

    @ConstructorProperties(value={"group","counter"})
    public Counter(String group,
                                              String counter)

### Counter

    @ConstructorProperties(value={"group","counter","increment"})
    public Counter(String group,
                                              String counter,
                                              int increment)

Method Detail

### getCounterEnum

    public Enum getCounterEnum()

### getGroupString

    public String getGroupString()

### getCounterString

    public String getCounterString()

### getIncrement

    public int getIncrement()

### isRemove

    public boolean isRemove(FlowProcess flowProcess,
                            FilterCall filterCall)

  Description copied from interface: `Filter`
  Method isRemove returns true if input should be removed from the tuple stream.

  Specified by:
    `isRemove` in interface `Filter`
  Parameters:
    `flowProcess` - of type FlowProcess
    `filterCall` - of type FilterCall
  Returns:
    boolean

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