public interface Accumulator<IN,OUT>
Modifier and Type | Method and Description |
---|---|
void |
add(IN value)
添加新值到累计器
|
Accumulator<IN,OUT> |
copy()
复制
|
OUT |
getAvgSum()
获取avg的总和值
备注: 集合类型调用返回null
|
java.lang.Long |
getNum()
用于avg的返回数量
|
boolean |
isZero()
判断是否是初始值
|
void |
merge(Accumulator<IN,OUT> other)
合并累计器
|
void |
reset()
重置累计器的值
|
OUT |
value()
返回累计器的值
|
boolean isZero()
Accumulator<IN,OUT> copy()
void reset()
void add(IN value)
value
- 需要添加的新值void merge(Accumulator<IN,OUT> other)
other
- 需要合并的累计器OUT value()
java.lang.Long getNum()
OUT getAvgSum()