|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collector
Defines the interface for statistical collectors. A collector is an object that counts, sums, computes averages and standard deviation, etc., based on user-provided observations.
The sole attribute defined in this class is a (distinctive) name; subclasses provide the specific attributes they need.
Method Summary | |
---|---|
void |
collect(double value)
Registers a new observation/instance/sample of this variable (this collector). |
java.lang.String |
getDescription()
Returns this collector's descrption. |
java.lang.String |
getName()
Returns this collector's name. |
double[] |
getResults()
Returns a space-separed list of "results". |
java.lang.String[] |
getResultsLabels()
Returns a list of the labels for the result, whose length must match exactly the length of the array returned by getResults() . |
java.lang.String |
report()
Returns this collector's name followed by the a list of desciption=value for the results. |
void |
setup(java.lang.String name,
java.lang.String desc)
Resets this collector. |
Method Detail |
---|
void setup(java.lang.String name, java.lang.String desc)
java.lang.String getName()
java.lang.String getDescription()
void collect(double value)
java.lang.String report()
double[] getResults()
java.lang.String[] getResultsLabels()
getResults()
.
However, if the result produced is not simple (for example, a
histogram), this method must return a zero-length array to
indicate that fact.
A label should be a short text, preferably a single word, and must not contain the "pipe" character (|), as that is used by report methods to separate columns when tabular forms are used. Example: {"average", "stddev", "min", "max"}.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |