public class FormulaConversionEntry extends ConversionEntry
ALL_DECIMALS, decimalsNumber, masterLabel, masterValue, slaveLabel, slaveValue
Constructor and Description |
---|
FormulaConversionEntry(java.lang.String masterLabel,
java.lang.String slaveLabel,
java.lang.String masterValue,
java.lang.String slaveValue,
int decimals,
double v1,
double v2)
Constructor for the FormulaConversionEntry 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.
|
formatDouble, getDecimalsNumber, getMasterLabel, getMasterValue, getSlaveLabel, getSlaveValue
public FormulaConversionEntry(java.lang.String masterLabel, java.lang.String slaveLabel, java.lang.String masterValue, java.lang.String slaveValue, int decimals, double v1, double v2) throws ConversionException
masterLabel
- The master measure label.slaveLabel
- The slave measure label.masterValue
- The master measure value.slaveValue
- The second section value.v1
- The v1 constantv2
- The v2 constantdecimals
- The decimals number to be included in the
result.ConversionException
- Trown when this conversion entry is
invalid, that means one of the argument is null, or v2 value is 0.public double convert(double what, boolean direct, int decimalsNumber)
convert
in class ConversionEntry
what
- The conversion argumentdirect
- If true, then make the conversion from master to
slave, otherwise reverse.decimalsNumber
- The decimals number witch be included in the
result.© Copyright Syncro Soft SRL 2002 - 2014. All rights reserved.