|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.timjohnstondev.unitconverter.logic.CalculationLogic
public final class CalculationLogic
Utility class that contains all of the logic for performing mathematical calculations for the conversions.
| Method Summary | |
|---|---|
static String |
getConversionFactor(String conversion)
Returns the formula or formatted numeric conversion factor. |
static String |
getResult(String input,
String conversionFactor,
BigDecimal molecularWeightCorrection)
Updates the result field if the input field has valid data and a conversion factor is selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getConversionFactor(String conversion)
conversion - the conversion factor or formula
public static String getResult(String input,
String conversionFactor,
BigDecimal molecularWeightCorrection)
input - inputconversionFactor - conversionFactormolecularWeightCorrection - the correction factor to adjust for molecular weight in mole to mass and mass to
mole conversions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||