|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
stella.sensor.AbstractConversion
public abstract class AbstractConversion
The class to dynamically construct ConvertToPhysical instances
using a properties object as a constructor. May also be used as a base
class for ConvertToPhysical and PhysicalDerivative
instances.
To allow the definition of the diverse decimal format retrieval methods in
both interfaces, the ConvertToPhysical and the
PhysicalDerivative interface, all relevant keys and default
definitions are present already in this class definition.
To allow the conversion to be transported with the event object, this class also implements the Serializable interface. To keep the serialized version slender, the keys and defaults used are defined transient and are used only during the construction phase to spark the existance of private copies of the required instances.
Note that due to the necessary serialization of conversion classes during data event generation, it is not feasible to implement a conversion class as an inner class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private static String |
DEFUNIT
The default unit, an empty string. |
private static DecimalFormat |
DEFVALUEFORMAT
The default decimal format for the values. |
private static DecimalFormat |
DEFVALUESIGMA
The default deciaml format for the sigma of the values. |
static String |
KEY_UNIT
The key pointing to the unit description. |
static String |
KEY_VALUEFORMAT
The key in the Properties referring to the value data format. |
static String |
KEY_VALUESIGMA
The key to the format string of the sigma of the value. |
private NumberFormat |
sigform
The decimal format instance to render the sigma of the values. |
private String |
unit
The serializable unit string. |
private NumberFormat |
valform
The decimal format instance to render the values. |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
protected |
AbstractConversion(Map prop)
Constructs a new command renderer. |
| Method Summary | |
|---|---|
static ConvertToPhysical |
createConversion(Map prop)
Constructs a new scheduling instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate. |
NumberFormat |
getSigmaValueFormat()
Returns the decimal format of the sigma of the value. |
String |
getUnit()
Returns the unit of the physical meaningful quantity. |
NumberFormat |
getValueFormat()
Returns the decimal format of the value. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.sensor.ConvertToPhysical |
|---|
getDeviation, getPhysical, getRaw |
| Field Detail |
|---|
public static final transient String KEY_UNIT
public static final transient String KEY_VALUEFORMAT
public static final transient String KEY_VALUESIGMA
private static final transient String DEFUNIT
private static final transient DecimalFormat DEFVALUEFORMAT
private static final transient DecimalFormat DEFVALUESIGMA
private String unit
private NumberFormat valform
private NumberFormat sigform
| Constructor Detail |
|---|
protected AbstractConversion(Map prop)
| Method Detail |
|---|
public String getUnit()
ConvertToPhysical.
getUnit in interface ConvertToPhysicalpublic NumberFormat getValueFormat()
ConvertToPhysical.
getValueFormat in interface ConvertToPhysicalpublic NumberFormat getSigmaValueFormat()
ConvertToPhysical.
getSigmaValueFormat in interface ConvertToPhysicalpublic static final ConvertToPhysical createConversion(Map prop)
PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate.
If this property is defined, a new Scheduling instance with the stated
class name is created, the supplied properties used as an argument in
the constructor. Can throw a lot of exceptions if unsuccessful.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||