Package org.openhab.core.library.unit
Class CurrencyUnits
java.lang.Object
tech.units.indriya.AbstractSystemOfUnits
org.openhab.core.library.unit.CurrencyUnits
- All Implemented Interfaces:
 javax.measure.spi.SystemOfUnits,tech.uom.lib.common.function.Nameable
@NonNullByDefault
public final class CurrencyUnits
extends tech.units.indriya.AbstractSystemOfUnits
The 
CurrencyUnits defines the UoM system for handling currencies- Author:
 - Jan N. Klug - Initial contribution
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class tech.units.indriya.AbstractSystemOfUnits
tech.units.indriya.AbstractSystemOfUnits.Helper - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final javax.measure.Unit<Currency> static final javax.measure.Unit<EnergyPrice> Fields inherited from class tech.units.indriya.AbstractSystemOfUnits
E, logger, quantityToUnit, units - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic javax.measure.Unit<Currency> createCurrency(String symbol, String name) static @Nullable BigDecimalgetExchangeRate(javax.measure.Unit<Currency> currency) Get the exchange rate for a given currency to the system's base unitstatic javax.measure.spi.SystemOfUnitsgetName()static voidremoveUnit(javax.measure.Unit<Currency> unit) Methods inherited from class tech.units.indriya.AbstractSystemOfUnits
getUnit, getUnit, getUnit, getUnit, getUnits, getUnits 
- 
Field Details
- 
BASE_CURRENCY
 - 
BASE_ENERGY_PRICE
 
 - 
 - 
Constructor Details
- 
CurrencyUnits
public CurrencyUnits() 
 - 
 - 
Method Details
- 
getName
- Specified by:
 getNamein interfacetech.uom.lib.common.function.Nameable- Specified by:
 getNamein interfacejavax.measure.spi.SystemOfUnits- Specified by:
 getNamein classtech.units.indriya.AbstractSystemOfUnits
 - 
addUnit
 - 
removeUnit
 - 
getInstance
public static javax.measure.spi.SystemOfUnits getInstance() - 
createCurrency
 - 
getExchangeRate
Get the exchange rate for a given currency to the system's base unit- Parameters:
 currency- the currency- Returns:
 - the exchange rate
 
 
 -