|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.timjohnstondev.unitconverter.model.ConversionFormula
public class ConversionFormula
This is a unit of measure with its related conversion formula to another unit.
| Constructor Summary | |
|---|---|
ConversionFormula(String newUnitName,
String newUnitSymbol,
String newToUnitSymbol,
String newFormula)
Constructs a ConversionFormula setting its name, symbol, to-symbol and formula. |
|
| Method Summary | |
|---|---|
String |
getConversion()
Returns this Conversion's factor or formula used to convert from one set of units to another. |
String |
getFormattedUnitSymbol()
Returns the html formatted unit symbol (used to show exponents correctly) for this Conversion. |
String |
getToUnitSymbol()
Returns the raw text symbol for the unit being converted to. |
String |
getUnitName()
Returns this symbol's name in unabbreviated words for this Conversion. |
String |
getUnitSymbol()
Returns the raw text unit symbol for this Conversion. |
void |
setUnitSeparator(String symbol)
Updates the unit separator symbol |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConversionFormula(String newUnitName,
String newUnitSymbol,
String newToUnitSymbol,
String newFormula)
ConversionFormula setting its name, symbol, to-symbol and formula.
newUnitName - the name of the unit in unabbreviated wordsnewUnitSymbol - the symbol of the unitnewToUnitSymbol - the symbol of the unit to be converted tonewFormula - the formula to perform the conversion| Method Detail |
|---|
public final String getUnitName()
ConversionConversion.
getUnitName in interface Conversionpublic final String getToUnitSymbol()
public final String getUnitSymbol()
ConversionConversion.
getUnitSymbol in interface Conversionpublic final String getFormattedUnitSymbol()
ConversionConversion.
getFormattedUnitSymbol in interface Conversionpublic final String getConversion()
ConversionConversion's factor or formula used to convert from one set of units to another.
getConversion in interface ConversionConversion's factor or formula to perform the conversionpublic final void setUnitSeparator(String symbol)
Conversion
setUnitSeparator in interface Conversionsymbol - the new unit separator symbol
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||