public class SumWatch extends AbstractValue implements ParameterDepending, AfterRegistering, Reloadable
StopWatches and returns their summed
value on request.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_SUMUP
The list of names of stop watches to add.
|
private List<StopWatch> |
watches
The list of truely registered watches.
|
private List<String> |
wish
The list of watches we want.
|
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_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
SumWatch(Map<String,String> prop)
Constructs a new observation time.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterAll()
If we have still some watches left that have not been registered,
yell now.
|
Number |
getValue()
Sums all watches and returns their values.
|
void |
init()
Initializes the list of requested watches.
|
void |
registerParameter(Parameter part)
Registers a new stop watch to this parameter.
|
double |
rescanned(String key,
String old,
String newval)
Exception, if watches change.
|
Number |
setValue(Number val)
Sets the current total time.
|
get, setcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, 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, stringPropertiesreloadpublic static final String KEY_SUMUP
public void init()
throws InitException
init in interface Initializableinit in class AbstractParameterInitExceptionpublic double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void afterAll()
afterAll in interface AfterRegisteringpublic void registerParameter(Parameter part)
KEY_SUMUP and has not already been registered, the watch
is added.registerParameter in interface ParameterDependingpublic Number setValue(Number val) throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationException