Package org.jrobin.data
Class Aggregates
- java.lang.Object
-
- 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 fromgetAggregates()
method inFetchData
andDataProcessor.getAggregates(String)
DataProcessor} classes.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
average
(package private) double
first
(package private) double
last
(package private) double
lslcorrel
(package private) double
lslint
(package private) double
lslslope
(package private) double
max
(package private) double
min
(package private) double
stdev
(package private) double
total
-
Fields inherited from interface org.jrobin.core.ConsolFuns
CF_AVERAGE, CF_FIRST, CF_LAST, CF_MAX, CF_MIN, CF_TOTAL
-
-
Constructor Summary
Constructors Constructor Description Aggregates()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
dump()
Returns String representing all aggregated values.double
getAggregate(String consolFun)
Returns single aggregated value for the give consolidation functiondouble
getAverage()
Returns averagedouble
getFirst()
Returns the first faluedouble
getLast()
Returns the last valuedouble
getLSLCorrel()
Returns Least Squares Line Correlation Coefficientdouble
getLSLInt()
Returns Least Squares Line y-intercept valuedouble
getLSLSlope()
Returns Least Squares Line Slope valuedouble
getMax()
Returns the maximum valuedouble
getMin()
Returns the minimal valuedouble
getStdev()
Returns stdev valuedouble
getTotal()
Returns total value
-
-
-
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
-
getStdev
public double getStdev()
Returns stdev value- Returns:
- Stdev value
-
getLSLSlope
public double getLSLSlope()
Returns Least Squares Line Slope value- Returns:
- lslslope value
-
getLSLInt
public double getLSLInt()
Returns Least Squares Line y-intercept value- Returns:
- lslint value
-
getLSLCorrel
public double getLSLCorrel()
Returns Least Squares Line Correlation Coefficient- Returns:
- lslcorrel 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 theConsolFuns
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
-
-