Package org.openhab.core.library.unit
Class CurrencyUnit
java.lang.Object
tech.units.indriya.AbstractUnit<Currency>
org.openhab.core.library.unit.CurrencyUnit
- All Implemented Interfaces:
Serializable
,Comparable<javax.measure.Unit<Currency>>
,javax.measure.Unit<Currency>
,tech.uom.lib.common.function.Nameable
,tech.uom.lib.common.function.PrefixOperator<Currency>
,tech.uom.lib.common.function.SymbolSupplier
@NonNullByDefault({PARAMETER,RETURN_TYPE,FIELD,TYPE_BOUND})
public final class CurrencyUnit
extends tech.units.indriya.AbstractUnit<Currency>
The
CurrencyUnit
is a UoM compatible unit for currencies.- Author:
- Jan N. Klug - Initial contribution
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tech.units.indriya.AbstractUnit
tech.units.indriya.AbstractUnit.Equalizer
-
Field Summary
Fields inherited from class tech.units.indriya.AbstractUnit
ONE, SYMBOL_TO_UNIT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
javax.measure.Unit<Currency>
divide
(double divisor) boolean
javax.measure.Dimension
getName()
@Nullable String
javax.measure.UnitConverter
int
hashCode()
boolean
isEquivalentTo
(javax.measure.Unit<Currency> that) javax.measure.Unit<Currency>
multiply
(double multiplier) javax.measure.Unit<?>
pow
(int n) javax.measure.Unit<Currency>
prefix
(javax.measure.Prefix prefix) void
void
javax.measure.Unit<Currency>
shift
(double offset) toString()
protected javax.measure.Unit<Currency>
Methods inherited from class tech.units.indriya.AbstractUnit
alternate, annotate, asType, divide, divide, getActualType, getConverterTo, getConverterToAny, getSystemUnit, internalGetConverterTo, inverse, isCompatible, isSystemUnit, multiply, multiply, parse, root, shift, transform
-
Constructor Details
-
CurrencyUnit
Create a newCurrency
- Parameters:
name
- 3-letter ISO-Codesymbol
- an (optional) symbol- Throws:
IllegalArgumentException
- if name is not valid
-
-
Method Details
-
getSystemConverter
public javax.measure.UnitConverter getSystemConverter()- Specified by:
getSystemConverter
in classtech.units.indriya.AbstractUnit<Currency>
-
toSystemUnit
- Specified by:
toSystemUnit
in classtech.units.indriya.AbstractUnit<Currency>
-
toString
-
getBaseUnits
-
getDimension
public javax.measure.Dimension getDimension() -
setName
- Overrides:
setName
in classtech.units.indriya.AbstractUnit<Currency>
-
getName
-
getSymbol
-
setSymbol
- Overrides:
setSymbol
in classtech.units.indriya.AbstractUnit<Currency>
-
shift
-
multiply
-
divide
-
pow
public javax.measure.Unit<?> pow(int n) -
prefix
-
compareTo
- Specified by:
compareTo
in interfaceComparable<javax.measure.Unit<Currency>>
- Overrides:
compareTo
in classtech.units.indriya.AbstractUnit<Currency>
-
isEquivalentTo
-
equals
- Specified by:
equals
in classtech.units.indriya.AbstractUnit<Currency>
-
hashCode
public int hashCode()- Specified by:
hashCode
in classtech.units.indriya.AbstractUnit<Currency>
-