Most visited

Recently visited

Added in API level 24

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.

Public methods

Currency getCurrency()

Returns the currency of this object.

Inherited methods

From class android.icu.util.Measure
From class java.lang.Object

Public constructors

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 24
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

Public methods

getCurrency

Added in API level 24
Currency getCurrency ()

Returns the currency of this object.

Returns
Currency this object's Currency

Hooray!