cascading.operation.state
Class Counter
java.lang.Object
cascading.operation.BaseOperation
cascading.operation.state.Counter
- All Implemented Interfaces:
- DeclaresResults, Filter, Operation, Traceable, 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
Fields inherited from interface cascading.operation.Operation |
ANY |
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 Enumincrement
- 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)
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 FlowProcessfilterCall
- 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
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.