|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jagg.Aggregator
net.sf.jagg.CountAggregator
public class CountAggregator
This class represents the "count" aggregator over any values.
Field Summary | |
---|---|
static java.lang.String |
COUNT_ALL
Special pseudo-property indicating "count all", even nulls. |
Fields inherited from class net.sf.jagg.Aggregator |
---|
PROP_SELF |
Constructor Summary | |
---|---|
CountAggregator(java.lang.String property)
Constructs an CountAggregator that operates on the specified
property. |
Method Summary | |
---|---|
void |
init()
Initialize the count to zero. |
void |
iterate(java.lang.Object value)
Count the property if its value is non-null. |
void |
merge(Aggregator agg)
Merge the given Aggregator into this one by adding the
counts. |
CountAggregator |
replicate()
Returns an uninitialized copy of this Aggregator object,
with the same property(ies) to analyze. |
java.lang.Long |
terminate()
Return the count. |
Methods inherited from class net.sf.jagg.Aggregator |
---|
equals, getAggregator, getAggregator, getProperty, getValueFromProperty, hashCode, isInUse, setInUse, setProperty, terminateDoubleDouble, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COUNT_ALL
Constructor Detail |
---|
public CountAggregator(java.lang.String property)
CountAggregator
that operates on the specified
property.
property
- Count this property's values.Method Detail |
---|
public CountAggregator replicate()
Aggregator
object,
with the same property(ies) to analyze.
replicate
in class Aggregator
Aggregator
object.public void init()
init
in class Aggregator
public void iterate(java.lang.Object value)
COUNT_ALL
, then always count it, null or not.
iterate
in class Aggregator
value
- The value to aggregate.COUNT_ALL
public void merge(Aggregator agg)
Aggregator
into this one by adding the
counts.
merge
in class Aggregator
agg
- The Aggregator
to merge into this one.public java.lang.Long terminate()
terminate
in class Aggregator
Long
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |