com.timjohnstondev.unitconverter.model
Interface Conversion

All Known Implementing Classes:
ConversionFactor, ConversionFormula

public interface Conversion

A Conversion provides access to the unit symbol, html formatted symbol (used to show exponents correctly), unit name and the conversion factor or 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 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
 

Method Detail

getConversion

String getConversion()
Returns this Conversion's factor or formula used to convert from one set of units to another.

Returns:
this Conversion's factor or formula to perform the conversion

getUnitName

String getUnitName()
Returns this symbol's name in unabbreviated words for this Conversion.

Returns:
the name for this symbol

getUnitSymbol

String getUnitSymbol()
Returns the raw text unit symbol for this Conversion.

Returns:
the unit symbol

getFormattedUnitSymbol

String getFormattedUnitSymbol()
Returns the html formatted unit symbol (used to show exponents correctly) for this Conversion.

Returns:
the html formatted unit symbol

setUnitSeparator

void setUnitSeparator(String symbol)
Updates the unit separator symbol

Parameters:
symbol - the new unit separator symbol


Copyright © 2009 Tim Johnston Development, LLC. All Rights Reserved.