public final class SIContent extends FloatingPointContent
Instances of this class implements SI base units and derived units with special names. Using these instances avoids the specification of a large number of content definitions in the metadata.
Each point using this content will have a 'Unit' param holding an optional SI prefix and a mandatory SI symbol.
This implementation keeps a cache of the generated instances keyed by the value multiplier.
Proxied.Abstract| Modifier and Type | Field and Description |
|---|---|
static String |
UNIT_PARAM
Param holding the abbreviation of a base or derived unit, including an
optional prefix.
|
| Constructor and Description |
|---|
SIContent() |
| Modifier and Type | Method and Description |
|---|---|
Serializable |
decode(PointValue pointValue)
Decodes the value of a point value.
|
Double |
denormalize(NormalizedValue normalizedValue)
Denormalizes the value of a point value.
|
Content |
getInstance(Point point)
Gets an appropriate instance of this content for the point.
|
Serializable |
normalize(PointValue pointValue)
Normalizes the value of a point value.
|
boolean |
setUp(Metadata metadata,
ProxyEntity proxyEntity)
Sets up the instance for action.
|
void |
tearDown()
Tears down what has been set up.
|
encode, warnBadValuegetMetadata, getName, getParams, getProxyEntity, getThisLoggerpublic static final String UNIT_PARAM
public Serializable decode(PointValue pointValue)
Converts from an external representation to an internal representation.
decode in interface Contentdecode in class AbstractContentpointValue - The point value associated with the value to decode.public Double denormalize(NormalizedValue normalizedValue)
Converts from an internal unit to an external unit.
denormalize in interface Contentdenormalize in class AbstractContentnormalizedValue - The point value associated with the value to be
denormalized.public Content getInstance(Point point)
getInstance in interface ContentgetInstance in class AbstractContentpoint - The point.public Serializable normalize(PointValue pointValue)
Converts from an external unit to an internal unit.
normalize in interface Contentnormalize in class AbstractContentpointValue - The point value associated with the value to be
normalized.public boolean setUp(Metadata metadata, ProxyEntity proxyEntity)
setUp in interface ProxiedsetUp in class Proxied.Abstractmetadata - The metadata available to the current process.proxyEntity - The proxy entity refering to the proxied.public void tearDown()
tearDown in interface ProxiedtearDown in class Proxied.AbstractCopyright © 2003-2019 Serge Brisson. All Rights Reserved.