|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.timjohnstondev.unitconverter.model.ConversionFactor
public class ConversionFactor
This is a unit of measure with its related conversion factor to some base unit.
| Constructor Summary | |
|---|---|
ConversionFactor(String newUnitName,
String newUnitSymbol,
String newFactor)
Constructs a ConversionFactor setting its name, symbol and factor. |
|
| 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 |
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 ConversionFactor(String newUnitName,
String newUnitSymbol,
String newFactor)
ConversionFactor setting its name, symbol and factor.
newUnitName - the name of the unit in unabbreviated wordsnewUnitSymbol - the symbol of the unitnewFactor - the conversion factor from this unit to some base unit| Method Detail |
|---|
public final String getUnitName()
ConversionConversion.
getUnitName in interface Conversionpublic 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 | |||||||||