cascading.operation.state

## Class Counter

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

All Implemented Interfaces:
  DeclaresResults, Filter, Operation, Traceable, java.io.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

Constructors
Constructor and Description
`Counter(java.lang.Enum counter)` Constructor Counter creates a new Counter instance.
`Counter(java.lang.Enum counter, int increment)` Constructor Counter creates a new Counter instance.
`Counter(java.lang.String group, java.lang.String counter)`
`Counter(java.lang.String group, java.lang.String counter, int increment)`

### Method Summary

Methods
`boolean` `equals(java.lang.Object object)`
`java.lang.Enum` `getCounterEnum()`
`java.lang.String` `getCounterString()`
`java.lang.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(java.lang.Enum counter)

Constructor Counter creates a new Counter instance.

Parameters:
  `counter` - of type Enum

#### Counter

    @ConstructorProperties(value={"counter","increment"})
    public Counter(java.lang.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(java.lang.String group,
                                 java.lang.String counter)

#### Counter

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

### Method Detail

#### getCounterEnum

    public java.lang.Enum getCounterEnum()

#### getGroupString

    public java.lang.String getGroupString()

#### getCounterString

    public java.lang.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(java.lang.Object object)

Overrides:
  `equals` in class `BaseOperation`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `BaseOperation`