org.jrobin.data
Class Aggregates

java.lang.Object
  extended by org.jrobin.data.Aggregates
All Implemented Interfaces:
ConsolFuns

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 DataProcessor.getAggregates(String) DataProcessor} classes.


Field Summary
 
Fields inherited from interface org.jrobin.core.ConsolFuns
CF_AVERAGE, CF_FIRST, CF_LAST, CF_MAX, CF_MIN, CF_TOTAL
 
Method Summary
 String dump()
          Returns String representing all aggregated values.
 double getAggregate(String consolFun)
          Returns single aggregated value for the give consolidation function
 double getAverage()
          Returns average
 double getFirst()
          Returns the first falue
 double getLast()
          Returns the last value
 double getMax()
          Returns the maximum value
 double getMin()
          Returns the minimal value
 double getTotal()
          Returns total value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMin

public double getMin()
Returns the minimal value

Returns:
Minimal value

getMax

public double getMax()
Returns the maximum value

Returns:
Maximum value

getFirst

public double getFirst()
Returns the first falue

Returns:
First value

getLast

public double getLast()
Returns the last value

Returns:
Last value

getAverage

public double getAverage()
Returns average

Returns:
Average value

getTotal

public double getTotal()
Returns total value

Returns:
Total value

getAggregate

public double getAggregate(String consolFun)
                    throws RrdException
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

dump

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

Returns:
String containing all aggregated values


Copyright 2003-2008. All Rights Reserved.