|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.epics.pvmanager.Function<R>
org.epics.pvmanager.Aggregator<R,A>
R
- result type of aggregationA
- argument type being aggregatedpublic abstract class Aggregator<R,A>
Aggregates the data out of a Collector into a new data type.
The Aggregator
uses calculate(java.util.List)
to aggregate
the values of the current time slice. If no values were collected in the
current time slice, the last value (and only the last value, is passed
so that the output remains consistent with what would be currently
posted. Non calculation is done if no values were collected in the current
and in the previous time slice.
Constructor Summary | |
---|---|
protected |
Aggregator(Function<java.util.List<A>> collector)
Creates a new aggregator. |
Method Summary | |
---|---|
protected abstract R |
calculate(java.util.List<A> data)
Calculates the new value from a set of collected value. |
R |
getValue()
Calculates, if needed, and then returns the value for this function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Aggregator(Function<java.util.List<A>> collector)
collector
- a suitable collectorMethod Detail |
---|
public final R getValue()
Function
getValue
in class Function<R>
protected abstract R calculate(java.util.List<A> data)
data
- the new data to aggregate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |