|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.StatisticValue
public abstract class StatisticValue
A value that is reset at receiving a certain error-event, cumulates
numbers with its set method and returns statistical values on get
queris. Note that this class is abstract, concrete subclasses may
use one of the getAverage(), getMinimum(), etc. methods to
retrieve a single value.
| Nested Class Summary | |
|---|---|
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. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
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 |
numbers
A list of numbers gathered from the last reset. |
private Statistic |
stat
The statisitcs object used to calculate values. |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface stella.ErrorDependingParameter |
|---|
NAMING_EXTENSION |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
protected |
StatisticValue(Map prop)
Constructs a new snapshot parameter. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class stella.parameter.AbstractValue |
|---|
get, set |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, rescanned, setName, toString |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
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, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.Parameter |
|---|
get, getFormatted, getName, getString, set |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, 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, stringProperties |
| Methods inherited from interface util.Initializable |
|---|
init |
| Methods inherited from interface stella.Value |
|---|
getValue |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_ERROR
public static final String KEY_THRESHOLD
private static final int DEFTHRESHOLD
private List numbers
private transient Statistic stat
| Constructor Detail |
|---|
protected StatisticValue(Map prop)
| Method Detail |
|---|
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)
setValue in interface Valueprotected Number getAverage()
protected Number getMedian()
protected Number getMaximum()
protected Number getMinimum()
protected Number getSigma()
public boolean isValid()
KEY_THRESHOLD values in
our list.
private static final Statistic createStatistic(List nums)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||