public abstract class StatisticValue extends AbstractValue implements ErrorDependingParameter
getAverage(), getMinimum(), etc. methods to
retrieve a single value.| Modifier and Type | Class and Description |
|---|---|
static class |
StatisticValue.Average
Useable class returning the average.
|
static class |
StatisticValue.Maximum
Useable class returning the average.
|
static class |
StatisticValue.Median
Useable class returning the median.
|
static class |
StatisticValue.Minimum
Useable class returning the average.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFTHRESHOLD
The minimum length of the shelf to return valid values.
|
static String |
KEY_ERROR
The class name of the error that serves as a reset-trigger.
|
static String |
KEY_THRESHOLD
The minimum length of the shelf to return valid values.
|
private List<Number> |
numbers
A list of numbers gathered from the last reset.
|
private Statistic |
stat
The statisitcs object used to calculate values.
|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Modifier | Constructor and Description |
|---|---|
protected |
StatisticValue(Map<String,String> prop)
Constructs a new snapshot parameter.
|
| Modifier and Type | Method and Description |
|---|---|
private static Statistic |
createStatistic(List nums)
Converts my number list into a ready-to-use statistics object.
|
protected Number |
getAverage()
From all accumulated numbers, get the average.
|
Object |
getForError(ErrorEvent err)
Checks if the error received is of the type specified in the
KEY_ERROR property. |
protected Number |
getMaximum()
From all accumulated numbers, get the maximum.
|
protected Number |
getMedian()
From all accumulated numbers, get the median.
|
protected Number |
getMinimum()
From all accumulated numbers, get the maximum.
|
protected Number |
getSigma()
From all accumulated numbers, get the standard eviation.
|
boolean |
isValid()
Returns true if we have at least
KEY_THRESHOLD values in
our list. |
void |
registerError(ErrorEvent err)
Registers the error.
|
Number |
setValue(Number accu)
Accumulates a number to the statistics.
|
get, setcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, overrideDefaultName, register, rescanned, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiesinitpublic static final String KEY_ERROR
public static final String KEY_THRESHOLD
private static final int DEFTHRESHOLD
private transient Statistic stat
public Object getForError(ErrorEvent err)
KEY_ERROR property. If so, the current value is returned
via the Value.getValue() method.getForError in interface ErrorDependingParameterpublic void registerError(ErrorEvent err)
KEY_ERROR property, the statistics is reset.registerError in interface ErrorDependingParameterpublic Number setValue(Number accu)
protected Number getAverage()
protected Number getMedian()
protected Number getMaximum()
protected Number getMinimum()
protected Number getSigma()
public boolean isValid()
KEY_THRESHOLD values in
our list.