stella.sensor
Class AbstractDerivative

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.sensor.AbstractConversion
          extended by stella.sensor.AbstractDerivative
All Implemented Interfaces:
Serializable, Cloneable, ConvertToPhysical, PhysicalDerivative, Initializable, PropertyBearing
Direct Known Subclasses:
CosineConversion, PolynomialConversion

public abstract class AbstractDerivative
extends AbstractConversion
implements PhysicalDerivative

The class to use as a base class for PhysicalDerivative instances. To allow the definition of the diverse decimal format retrieval methods in PhysicalDerivative interface, all relevant keys and default definitions are present already in this class definition and stored in reserved fields. This class needs no own create method because its parental class method may also be used to construct these instances.

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.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static DecimalFormat DEFVALUEDERIVATIVE
          The default format string for the derivative values.
private  NumberFormat derivform
          The decimal format instance to render the derivative values.
static String KEY_VALUEDERIVATIVE
          The key to the derivative-value-format string.
 
Fields inherited from class stella.sensor.AbstractConversion
KEY_UNIT, KEY_VALUEFORMAT, KEY_VALUESIGMA
 
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 AbstractDerivative(Map prop)
          Constructs a new command renderer.
 
Method Summary
 NumberFormat getDerivativeValueFormat()
          Returns the decimal format of the sigma of the raw value.
 
Methods inherited from class stella.sensor.AbstractConversion
createConversion, getSigmaValueFormat, getUnit, getValueFormat
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.sensor.PhysicalDerivative
getPhysicalDerivative, getRawDerivative
 
Methods inherited from interface stella.sensor.ConvertToPhysical
getDeviation, getPhysical, getRaw, getSigmaValueFormat, getUnit, getValueFormat
 

Field Detail

KEY_VALUEDERIVATIVE

public static final transient String KEY_VALUEDERIVATIVE
The key to the derivative-value-format string.

See Also:
Constant Field Values

DEFVALUEDERIVATIVE

private static final transient DecimalFormat DEFVALUEDERIVATIVE
The default format string for the derivative values.


derivform

private NumberFormat derivform
The decimal format instance to render the derivative values.

Constructor Detail

AbstractDerivative

protected AbstractDerivative(Map prop)
Constructs a new command renderer. It has the given properties.

Method Detail

getDerivativeValueFormat

public NumberFormat getDerivativeValueFormat()
Returns the decimal format of the sigma of the raw value. Required by PhysicalDerivative.

Specified by:
getDerivativeValueFormat in interface PhysicalDerivative