public class CountGroupCalculator extends AbstractGroupCalculator<Integer,DefaultCalcIntermResult<Integer>,Object>
#compute(DefaultCalcIntermResult, Object) method using the an immutable
DefaultCalcIntermResult object.| Constructor and Description |
|---|
CountGroupCalculator()
constructor (sets the label = "Count")
|
CountGroupCalculator(String label)
Use this constructor when you want to control the label
|
| Modifier and Type | Method and Description |
|---|---|
DefaultCalcIntermResult<Integer> |
compute(DefaultCalcIntermResult<Integer> intermResult,
Object newValue)
increases the count
|
DefaultCalcIntermResult<Integer> |
init()
initializes the counter to zero
|
getLabelpublic static final String LABEL
public CountGroupCalculator()
public CountGroupCalculator(String label)
label - the labelpublic DefaultCalcIntermResult<Integer> init()
public DefaultCalcIntermResult<Integer> compute(DefaultCalcIntermResult<Integer> intermResult, Object newValue)
intermResult - the previous intermediate result ( it's the 10 in my example)newValue - the current value (it's the "whatever text" in my example above)Copyright © 2006–2015. All rights reserved.