public class Value extends Handle
Modifier and Type | Class and Description |
---|---|
static class |
Value.Parameters
Parameters for building Value instances.
|
Constructor and Description |
---|
Value(String name,
Statistics manager,
Value.Parameters parameters)
Configure a Value instance fully, no raw config access.
|
Modifier and Type | Method and Description |
---|---|
static Value |
buildValue(String name,
Statistics manager,
Value.Parameters defaults)
Build a Value which should be initialized from config.
|
boolean |
equals(Object o) |
double |
get()
Get last value logged, 0 if nothing logged since reset.
|
double |
getMax()
Get maximum value logged since last reset.
|
double |
getMean()
Get mean value since last reset.
|
double |
getMin()
Get minimal value logged since last reset.
|
int |
hashCode() |
void |
put(double x)
Insert x, do all pertinent operations.
|
void |
reset()
Set last value logged container to 0, reset histogram and set all
counters and derived statistics to 0.
|
void |
runHandle()
Dump state to log and reset.
|
String |
toString() |
cancel, isCancelled, run, runCallback
public Value(String name, Statistics manager, Value.Parameters parameters)
name
- tag for loggingmanager
- the statistics manager acquired by injectionparameters
- all the parameters necessary for initializing a ValueIllegalStateException
- if Parameters.limits exists and is not frozenpublic static Value buildValue(String name, Statistics manager, Value.Parameters defaults)
name
- the name of the event in the logmanager
- the current Statistics manager, acquired by injectiondefaults
- defaults for values not defined by config, this may be nullpublic void put(double x)
public double getMean()
public double getMin()
public double getMax()
public double get()
public void reset()
public void runHandle()
Copyright © 2018. All rights reserved.