|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.vars.SimpleVarStats
org.hd.d.pg2k.svrCore.vars.SimpleNumberStats
public final class SimpleNumberStats
Immutable simple stats derived from a NUMBER globalMap variable. Has a toString() method directly usable on a JSP page.
Captures a reference to the value it was constructed from.
For most combination operators such as getSum(), values are manipulated as double (as risk of precision loss) to:
| Field Summary | |
|---|---|
private java.text.DecimalFormat |
format
Our computed formatting object; never null. |
private java.lang.String |
pattern
The pattern String; never null. |
| Fields inherited from class org.hd.d.pg2k.svrCore.vars.SimpleVarStats |
|---|
filteredVar |
| Constructor Summary | |
|---|---|
SimpleNumberStats(SimpleVariableValue originalVar,
long oldestAllowed,
InstanceID sysID,
java.lang.String decimalFormatPattern)
Construct a new instance, filtering variable globalMap members by age. |
|
| Method Summary | |
|---|---|
java.lang.Number |
getMax()
Gets the maximum of the non-null values. |
java.lang.Number |
getMin()
Gets the minimum of the non-null values. |
java.lang.String |
getPattern()
Get the pattern String; never null. |
java.lang.Number |
getSum()
Gets the total of the non-null values. |
java.lang.String |
toString()
Returns HTML- and human- friendly summary of numerical stats. |
| Methods inherited from class org.hd.d.pg2k.svrCore.vars.SimpleVarStats |
|---|
getFilteredVar, getMainValue, getNonNullValueCount, getSystemCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String pattern
private final transient java.text.DecimalFormat format
| Constructor Detail |
|---|
public SimpleNumberStats(SimpleVariableValue originalVar,
long oldestAllowed,
InstanceID sysID,
java.lang.String decimalFormatPattern)
originalVar - the variable to compute; must be non-null
TYPE_NUMBER (and getValue() must return non-null value)oldestAllowed - any globalMap entry than this will
be ignored, which allows only up-to-date information
to be includeddecimalFormatPattern - numeric formatting string to
be used for display of most quantities; never nullsysID - identifies this system so we can select the local
value of a global variable if available; can be null| Method Detail |
|---|
public java.lang.String getPattern()
public java.lang.Number getSum()
public java.lang.Number getMax()
public java.lang.Number getMin()
public java.lang.String toString()
If the count is zero, just returns a formatted version of the value.
toString in class SimpleVarStats
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||