public class FactorConversionEntry extends ConversionEntry
ALL_DECIMALS, decimalsNumber, masterLabel, masterValue, slaveLabel, slaveValue
Constructor and Description |
---|
FactorConversionEntry(java.lang.String masterLabel,
java.lang.String slaveLabel,
java.lang.String masterValue,
java.lang.String slaveValue,
int decimalsToShow,
double factor)
Constructor for the FactorConversionEntry object.
|
Modifier and Type | Method and Description |
---|---|
double |
convert(double what,
boolean direct,
int decimalsNumber)
Converts the argument from the master measure to the slave measure if
direct attribute is true, otherwise reverse.
|
formatDouble, getDecimalsNumber, getMasterLabel, getMasterValue, getSlaveLabel, getSlaveValue
public FactorConversionEntry(java.lang.String masterLabel, java.lang.String slaveLabel, java.lang.String masterValue, java.lang.String slaveValue, int decimalsToShow, double factor) throws ConversionException
masterLabel
- The master measure label.slaveLabel
- The slave measure label.masterValue
- The master measure value.slaveValue
- The second section value.decimalsToShow
- The decimals number to be included in the
result.factor
- The conversion factor.ConversionException
- Trown when this conversion entry is
invalid, that means one of the argument is null, or conversion
factor is 0.public double convert(double what, boolean direct, int decimalsNumber)
convert
in class ConversionEntry
what
- The conversion argument.direct
- If true, then make the conversion from s1 to s2,
otherwise reverse.decimalsNumber
- The decimals number witch be included in the
result.© Copyright Syncro Soft SRL 2002 - 2014. All rights reserved.