|
||||||||||
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.MaxAggregator
public class MaxAggregator
This class represents the "max" aggregator over Comparable
values.
Field Summary |
---|
Fields inherited from class net.sf.jagg.Aggregator |
---|
PROP_SELF |
Constructor Summary | |
---|---|
MaxAggregator(java.lang.String property)
Constructs a MaxAggregator that operates on the specified
property. |
Method Summary | |
---|---|
void |
init()
Initialize the maximum to null . |
void |
iterate(java.lang.Object value)
Store the property value if it's higher than the current maximum. |
void |
merge(Aggregator agg)
Merge the given Aggregator into this one by taking the
maximum of the two maximums. |
MaxAggregator |
replicate()
Returns an uninitialized copy of this Aggregator object,
with the same property(ies) to analyze. |
java.lang.Comparable |
terminate()
Return the maximum. |
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 |
Constructor Detail |
---|
public MaxAggregator(java.lang.String property)
MaxAggregator
that operates on the specified
property.
property
- Determine the maximum of this property's values.Method Detail |
---|
public MaxAggregator replicate()
Aggregator
object,
with the same property(ies) to analyze.
replicate
in class Aggregator
Aggregator
object.public void init()
null
.
init
in class Aggregator
public void iterate(java.lang.Object value)
iterate
in class Aggregator
value
- The value to aggregate.Aggregator.getValueFromProperty(java.lang.Object, java.lang.String)
public void merge(Aggregator agg)
Aggregator
into this one by taking the
maximum of the two maximums.
merge
in class Aggregator
agg
- The Aggregator
to merge into this one.public java.lang.Comparable terminate()
terminate
in class Aggregator
Comparable
, or null
if
no values were processed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |