org.jrobin.data

Class Aggregates

public class Aggregates extends Object implements ConsolFuns

Simple class which holds aggregated values (MIN, MAX, FIRST, LAST, AVERAGE and TOTAL). You don't need to create objects of this class directly. Objects of this class are returned from getAggregates() method in FetchData and getAggregates DataProcessor} classes.
Method Summary
Stringdump()
Returns String representing all aggregated values.
doublegetAggregate(String consolFun)
Returns single aggregated value for the give consolidation function
doublegetAverage()
Returns average
doublegetFirst()
Returns the first falue
doublegetLast()
Returns the last value
doublegetMax()
Returns the maximum value
doublegetMin()
Returns the minimal value
doublegetTotal()
Returns total value

Method Detail

dump

public String dump()
Returns String representing all aggregated values. Just for debugging purposes.

Returns: String containing all aggregated values

getAggregate

public double getAggregate(String consolFun)
Returns single aggregated value for the give consolidation function

Parameters: consolFun Consolidation function: MIN, MAX, FIRST, LAST, AVERAGE, TOTAL. These constants are conveniently defined in the ConsolFuns interface.

Returns: Aggregated value

Throws: RrdException Thrown if unsupported consolidation function is supplied

getAverage

public double getAverage()
Returns average

Returns: Average value

getFirst

public double getFirst()
Returns the first falue

Returns: First value

getLast

public double getLast()
Returns the last value

Returns: Last value

getMax

public double getMax()
Returns the maximum value

Returns: Maximum value

getMin

public double getMin()
Returns the minimal value

Returns: Minimal value

getTotal

public double getTotal()
Returns total value

Returns: Total value