CurrencyAmount


public class CurrencyAmount
extends Measure

java.lang.Object
   ↳ android.icu.util.Measure
     ↳ android.icu.util.CurrencyAmount


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

See also:

Summary

Public constructors

CurrencyAmount(Number number, Currency currency)

Constructs a new object given a number and a currency.

CurrencyAmount(double number, Currency currency)

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

CurrencyAmount(Number number, Currency currency)

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

CurrencyAmount(double number, Currency currency)

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

Public methods

Currency getCurrency()

Returns the currency of this object.

Inherited methods

Public constructors

CurrencyAmount

Added in API level 24
public 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 24
public CurrencyAmount (double number, 
                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
public 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

CurrencyAmount

Added in API level 29
public CurrencyAmount (double number, 
                Currency currency)

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

Parameters
number double: a double value

currency Currency: the currency

Public methods

getCurrency

Added in API level 24
public Currency getCurrency ()

Returns the currency of this object.

Returns
Currency this object's Currency