Class CurrencyUnit

java.lang.Object
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 Object implements javax.measure.Unit<Currency>, Comparable<javax.measure.Unit<Currency>>, tech.uom.lib.common.function.PrefixOperator<Currency>, tech.uom.lib.common.function.Nameable, Serializable, tech.uom.lib.common.function.SymbolSupplier
The CurrencyUnit is a UoM compatible unit for currencies.
Author:
Jan N. Klug - Initial contribution
See Also:
  • Constructor Details

  • Method Details

    • getSystemConverter

      public javax.measure.UnitConverter getSystemConverter()
    • toString

      public String toString()
      Specified by:
      toString in interface javax.measure.Unit<Currency>
      Overrides:
      toString in class Object
    • getSystemUnit

      public javax.measure.Unit<Currency> getSystemUnit()
      Specified by:
      getSystemUnit in interface javax.measure.Unit<Currency>
    • isCompatible

      public boolean isCompatible(@NonNullByDefault({}) javax.measure.Unit<?> that)
      Specified by:
      isCompatible in interface javax.measure.Unit<Currency>
    • asType

      @NonNullByDefault({}) public <T extends javax.measure.Quantity<T>> javax.measure.Unit<T> asType(@NonNullByDefault({}) Class<T> type)
      Specified by:
      asType in interface javax.measure.Unit<Currency>
    • getBaseUnits

      @NonNullByDefault({}) public Map<? extends javax.measure.Unit<?>,Integer> getBaseUnits()
      Specified by:
      getBaseUnits in interface javax.measure.Unit<Currency>
    • getDimension

      public javax.measure.Dimension getDimension()
      Specified by:
      getDimension in interface javax.measure.Unit<Currency>
    • setName

      public void setName(String name)
    • getName

      public String getName()
      Specified by:
      getName in interface tech.uom.lib.common.function.Nameable
      Specified by:
      getName in interface javax.measure.Unit<Currency>
    • getSymbol

      public @Nullable String getSymbol()
      Specified by:
      getSymbol in interface tech.uom.lib.common.function.SymbolSupplier
      Specified by:
      getSymbol in interface javax.measure.Unit<Currency>
    • setSymbol

      public void setSymbol(@Nullable String s)
    • getConverterTo

      public final javax.measure.UnitConverter getConverterTo(@NonNullByDefault({}) javax.measure.Unit<Currency> that) throws javax.measure.UnconvertibleException
      Specified by:
      getConverterTo in interface javax.measure.Unit<Currency>
      Throws:
      javax.measure.UnconvertibleException
    • getConverterToAny

      @NonNullByDefault({}) public final javax.measure.UnitConverter getConverterToAny(@NonNullByDefault({}) javax.measure.Unit<?> that) throws javax.measure.IncommensurableException, javax.measure.UnconvertibleException
      Specified by:
      getConverterToAny in interface javax.measure.Unit<Currency>
      Throws:
      javax.measure.IncommensurableException
      javax.measure.UnconvertibleException
    • alternate

      public final javax.measure.Unit<Currency> alternate(@NonNullByDefault({}) String newSymbol)
      Specified by:
      alternate in interface javax.measure.Unit<Currency>
    • transform

      public final javax.measure.Unit<Currency> transform(@NonNullByDefault({}) javax.measure.UnitConverter operation)
      Specified by:
      transform in interface javax.measure.Unit<Currency>
    • shift

      public javax.measure.Unit<Currency> shift(@NonNullByDefault({}) Number offset)
      Specified by:
      shift in interface javax.measure.Unit<Currency>
    • multiply

      public javax.measure.Unit<Currency> multiply(@NonNullByDefault({}) Number factor)
      Specified by:
      multiply in interface javax.measure.Unit<Currency>
    • shift

      public javax.measure.Unit<Currency> shift(double offset)
      Specified by:
      shift in interface javax.measure.Unit<Currency>
    • multiply

      public javax.measure.Unit<Currency> multiply(double multiplier)
      Specified by:
      multiply in interface javax.measure.Unit<Currency>
    • divide

      public javax.measure.Unit<Currency> divide(double divisor)
      Specified by:
      divide in interface javax.measure.Unit<Currency>
    • multiply

      public final javax.measure.Unit<?> multiply(@NonNullByDefault({}) javax.measure.Unit<?> that)
      Specified by:
      multiply in interface javax.measure.Unit<Currency>
    • inverse

      public final javax.measure.Unit<?> inverse()
      Specified by:
      inverse in interface javax.measure.Unit<Currency>
    • divide

      public final javax.measure.Unit<Currency> divide(@NonNullByDefault({}) Number divisor)
      Specified by:
      divide in interface javax.measure.Unit<Currency>
    • divide

      public final javax.measure.Unit<?> divide(@NonNullByDefault({}) javax.measure.Unit<?> that)
      Specified by:
      divide in interface javax.measure.Unit<Currency>
    • root

      public final javax.measure.Unit<?> root(int n)
      Specified by:
      root in interface javax.measure.Unit<Currency>
    • pow

      public javax.measure.Unit<?> pow(int n)
      Specified by:
      pow in interface javax.measure.Unit<Currency>
    • prefix

      public javax.measure.Unit<Currency> prefix(@NonNullByDefault({}) javax.measure.Prefix prefix)
      Specified by:
      prefix in interface tech.uom.lib.common.function.PrefixOperator<Currency>
      Specified by:
      prefix in interface javax.measure.Unit<Currency>
    • compareTo

      public int compareTo(javax.measure.Unit<Currency> that)
      Specified by:
      compareTo in interface Comparable<javax.measure.Unit<Currency>>
    • isEquivalentTo

      public boolean isEquivalentTo(@NonNullByDefault({}) javax.measure.Unit<Currency> that)
      Specified by:
      isEquivalentTo in interface javax.measure.Unit<Currency>
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object