org.jcon.data
Class Aggregation

java.lang.Object
  extended by org.jcon.data.Aggregation

public class Aggregation
extends java.lang.Object

Performs and holds the results of a variety of aggregate calculations. Most are only valid for Number objects.


Constructor Summary
Aggregation()
           
Aggregation(java.lang.Object victim)
          Runs includeAll() on the given object.
 
Method Summary
 double getAverage()
           
 int getCount()
           
 double getMaximum()
           
 double getMinimum()
           
 double getSum()
           
 void include(java.lang.Object victim)
          Includes the given object in the aggregation.
 void includeAll(java.lang.Object victim)
          Tries to iterate across the given object, executing include() on each member.
 void includeAll(java.lang.Object victim, java.lang.String property)
          Tries to iterate across the given object, executing include() on a subproperty of each member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aggregation

public Aggregation()

Aggregation

public Aggregation(java.lang.Object victim)
Runs includeAll() on the given object.

Method Detail

include

public void include(java.lang.Object victim)
Includes the given object in the aggregation. Results are adjusted accordingly.


includeAll

public void includeAll(java.lang.Object victim)
Tries to iterate across the given object, executing include() on each member.


includeAll

public void includeAll(java.lang.Object victim,
                       java.lang.String property)
Tries to iterate across the given object, executing include() on a subproperty of each member.


getCount

public int getCount()

getAverage

public double getAverage()

getMinimum

public double getMinimum()

getMaximum

public double getMaximum()

getSum

public double getSum()