|
|||||||||
| 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
public class SimpleVarStats
Generic stats on a variable. More specific instances may be useful in many cases, but this will do for simple cases, and just shows a mapping from participating system to value without interpretting those values.
| Field Summary | |
|---|---|
protected SimpleVariableValue |
filteredVar
The TYPE_NUMBER variable we were constructed from after filtering; never null. |
private InstanceID |
thisSys
This system ID, or null if none selected. |
| Constructor Summary | |
|---|---|
SimpleVarStats(SimpleVariableValue originalVar,
long oldestAllowed,
InstanceID sysID)
Construct a new instance, filtering variable globalMap members by age. |
|
| Method Summary | |
|---|---|
SimpleVariableValue |
getFilteredVar()
Get the variable stripped of old globalMap entries. |
java.lang.Object |
getMainValue()
Get "main" value; may be null. |
int |
getNonNullValueCount()
Get count of globalMap entries with non-null values. |
int |
getSystemCount()
Get count of participating systems (ie globalMap entries); 0 for local variable or no globalMap. |
java.lang.String |
toString()
Returns HTML- and human- friendly summary of stats. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final InstanceID thisSys
protected final SimpleVariableValue filteredVar
| Constructor Detail |
|---|
public SimpleVarStats(SimpleVariableValue originalVar,
long oldestAllowed,
InstanceID sysID)
originalVar - the variable to compute; must be non-null
but getValue() is permitted to return null
so that we can handle TYPE_NONE values for exampleoldestAllowed - any globalMap entry than this will
be ignored, which allows only up-to-date information
to be includedsysID - identifies this system so we can select the local
value of a global variable if available; can be null| Method Detail |
|---|
public SimpleVariableValue getFilteredVar()
public java.lang.Object getMainValue()
For a global, if a system ID is supplied and has an entry in the globalMap, its value is used, else the normal getValue() is used as for a local.
public int getSystemCount()
public int getNonNullValueCount()
public java.lang.String toString()
If the count is zero, just returns a formatted version of the value.
Note that this simply relies on the toString() method of the value type, and shows a direct map of all the values, so may not work well for large numbers of systems or unfriendly values.
It may be best to override this for many/most variable types.
toString in class java.lang.Object
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||