public class UnitValueContent extends DoubleContent
This content converter extends the DoubleContent content converter
by specifying a multiplier whose value comes from the 'Multiplier' param.
This multiplier is used as a divisor during denormalization.
Proxied.Abstract| Modifier and Type | Field and Description |
|---|---|
static String |
MULTIPLIER_PARAM
Conversion factor.
|
| Constructor and Description |
|---|
UnitValueContent() |
| Modifier and Type | Method and Description |
|---|---|
Double |
denormalize(NormalizedValue normalizedValue)
Denormalizes the value of a point value.
|
protected double |
getMultiplier()
Gets the multiplier.
|
Double |
normalize(PointValue pointValue)
Normalizes the value of a point value.
|
boolean |
setUp(Metadata metadata,
ProxyEntity proxyEntity)
Sets up the instance for action.
|
decode, getDoubleencode, getInstance, warnBadValuegetMetadata, getName, getParams, getProxyEntity, getThisLogger, tearDownpublic static final String MULTIPLIER_PARAM
public Double denormalize(NormalizedValue normalizedValue)
Converts from an internal unit to an external unit.
denormalize in interface Contentdenormalize in class DoubleContentnormalizedValue - The point value associated with the value to be
denormalized.public Double normalize(PointValue pointValue)
Converts from an external unit to an internal unit.
normalize in interface Contentnormalize in class DoubleContentpointValue - 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.@CheckReturnValue protected final double getMultiplier()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.