Added in API level 24

CurrencyAmount


open class CurrencyAmount : Measure
kotlin.Any
   ↳ android.icu.util.Measure
   ↳ android.icu.util.CurrencyAmount

An amount of currency, consisting of a Number and a Currency. CurrencyAmount objects are immutable.

Summary

Public constructors
CurrencyAmount(number: Double, currency: Currency!)

Constructs a new object given a double value and a currency.

CurrencyAmount(number: Double, currency: Currency!)

Constructs a new object given a double value and a Java currency.

CurrencyAmount(number: Number!, currency: Currency!)

Constructs a new object given a number and a currency.

CurrencyAmount(number: Number!, currency: Currency!)

Constructs a new object given a number and a Java currency.

Public methods
open Currency!

Returns the currency of this object.

Inherited functions

Public constructors

CurrencyAmount

Added in API level 24
CurrencyAmount(
    number: Double,
    currency: Currency!)

Constructs a new object given a double value and a currency.

Parameters
number Double: a double value
currency Currency!: the currency

CurrencyAmount

Added in API level 29
CurrencyAmount(
    number: Double,
    currency: Currency!)

Constructs a new object given a double value and a Java currency.

Parameters
number Double: a double value
currency Currency!: the currency

CurrencyAmount

Added in API level 24
CurrencyAmount(
    number: Number!,
    currency: Currency!)

Constructs a new object given a number and a currency.

Parameters
number Number!: the number
currency Currency!: the currency

CurrencyAmount

Added in API level 29
CurrencyAmount(
    number: Number!,
    currency: Currency!)

Constructs a new object given a number and a Java currency.

Parameters
number Number!: the number
currency Currency!: the currency

Public methods

getCurrency

Added in API level 24
open fun getCurrency(): Currency!

Returns the currency of this object.

Return
Currency! this object's Currency