public abstract class ConversionEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALL_DECIMALS
Constant for defining that all decimals should be included in the
result.
|
protected int |
decimalsNumber
The decimals number to show.
|
protected java.lang.String |
masterLabel
The master measure label.
|
protected java.lang.String |
masterValue
The master measure label.
|
protected java.lang.String |
slaveLabel
The slave measure label.
|
protected java.lang.String |
slaveValue
The slave measure value.
|
Constructor and Description |
---|
ConversionEntry() |
Modifier and Type | Method and Description |
---|---|
abstract double |
convert(double what,
boolean direct,
int decimalsNumber)
Converts the argument from the master measure to the slave measure if
direct attribute is true, else reverse.
|
protected double |
formatDouble(double numberToFormat,
int decimalsNumberToRepresent)
Format a double number with specified decimals number to be included in
the result.
|
int |
getDecimalsNumber()
Return decimals number to show.
|
java.lang.String |
getMasterLabel()
Return master measure label.
|
java.lang.String |
getMasterValue()
Return master measure value.
|
java.lang.String |
getSlaveLabel()
Return slave measure label.
|
java.lang.String |
getSlaveValue()
Return slave measure value.
|
public static final int ALL_DECIMALS
protected java.lang.String slaveLabel
protected java.lang.String masterLabel
protected java.lang.String slaveValue
protected java.lang.String masterValue
protected int decimalsNumber
public int getDecimalsNumber()
public java.lang.String getSlaveLabel()
public java.lang.String getMasterLabel()
public java.lang.String getSlaveValue()
public java.lang.String getMasterValue()
public abstract double convert(double what, boolean direct, int decimalsNumber)
what
- The conversion argument.direct
- If true, then make the conversion from master to
slave, otherwise reverse.decimalsNumber
- The decimals number witch be included in the
result.protected double formatDouble(double numberToFormat, int decimalsNumberToRepresent)
numberToFormat
- Number to format.decimalsNumberToRepresent
- The decimals number.© Copyright Syncro Soft SRL 2002 - 2014. All rights reserved.