public abstract class AbstractConversion extends PropertyContainer implements ConvertToPhysical, Serializable
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.
| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFUNIT
The default unit, an empty string.
|
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 static long |
serialVersionUID |
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConversion(Map<String,String> prop)
Constructs a new command renderer.
|
| Modifier and Type | Method and Description |
|---|---|
static ConvertToPhysical |
createConversion(Map prop)
Constructs a new scheduling instance using the mapping of the
PropertySupplying.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.
|
augment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeviation, getPhysical, getRawprivate static final long serialVersionUID
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
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)
PropertySupplying.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.