Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/icu/util/CurrencyAmount#pubctors) \| [Methods](https://developer.android.com/reference/android/icu/util/CurrencyAmount#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/util/CurrencyAmount#inhmethods)

# CurrencyAmount

*** ** * ** ***

` public class CurrencyAmount `   
` ` ` extends https://developer.android.com/reference/android/icu/util/Measure ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.icu.util.Measure](https://developer.android.com/reference/android/icu/util/Measure) ||
|   | ↳ | android.icu.util.CurrencyAmount |

<br />

*** ** * ** ***

An amount of currency, consisting of a Number and a Currency. CurrencyAmount objects are immutable.
**See also:**

- `https://developer.android.com/reference/java/lang/Number`
- `https://developer.android.com/reference/android/icu/util/Currency`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/icu/util/CurrencyAmount#CurrencyAmount(double,%20android.icu.util.Currency)(double number, https://developer.android.com/reference/android/icu/util/Currency currency) ` Constructs a new object given a double value and a currency. |
| ` https://developer.android.com/reference/android/icu/util/CurrencyAmount#CurrencyAmount(double,%20java.util.Currency)(double number, https://developer.android.com/reference/java/util/Currency currency) ` Constructs a new object given a double value and a Java currency. |
| ` https://developer.android.com/reference/android/icu/util/CurrencyAmount#CurrencyAmount(java.lang.Number,%20android.icu.util.Currency)(https://developer.android.com/reference/java/lang/Number number, https://developer.android.com/reference/android/icu/util/Currency currency) ` Constructs a new object given a number and a currency. |
| ` https://developer.android.com/reference/android/icu/util/CurrencyAmount#CurrencyAmount(java.lang.Number,%20java.util.Currency)(https://developer.android.com/reference/java/lang/Number number, https://developer.android.com/reference/java/util/Currency currency) ` Constructs a new object given a number and a Java currency. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/icu/util/Currency` | ` https://developer.android.com/reference/android/icu/util/CurrencyAmount#getCurrency()() ` Returns the currency of this object. |

### Inherited methods

From class ` https://developer.android.com/reference/android/icu/util/Measure ` ` boolean` ` https://developer.android.com/reference/android/icu/util/Measure#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Returns true if the given object is equal to this object.
` https://developer.android.com/reference/java/lang/Number` ` https://developer.android.com/reference/android/icu/util/Measure#getNumber()() `

Returns the numeric value of this object.
` https://developer.android.com/reference/android/icu/util/MeasureUnit` ` https://developer.android.com/reference/android/icu/util/Measure#getUnit()() `

Returns the unit of this object.
` int` ` https://developer.android.com/reference/android/icu/util/Measure#hashCode()() `

Returns a hashcode for this object.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/icu/util/Measure#toString()() `

Returns a string representation of this object.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### CurrencyAmount

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CurrencyAmount (double number, 
                Currency currency)
```

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

<br />

| Parameters ||
|---|---|
| `number` | `double`: a double value <br /> |
| `currency` | `Currency`: the currency <br /> |

### CurrencyAmount

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CurrencyAmount (double number, 
                Currency currency)
```

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

<br />

| Parameters ||
|---|---|
| `number` | `double`: a double value <br /> |
| `currency` | `Currency`: the currency <br /> |

### CurrencyAmount

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CurrencyAmount (Number number, 
                Currency currency)
```

Constructs a new object given a number and a currency.

<br />

| Parameters ||
|---|---|
| `number` | `Number`: the number <br /> |
| `currency` | `Currency`: the currency <br /> |

### CurrencyAmount

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CurrencyAmount (Number number, 
                Currency currency)
```

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

<br />

| Parameters ||
|---|---|
| `number` | `Number`: the number <br /> |
| `currency` | `Currency`: the currency <br /> |

## Public methods

### getCurrency

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Currency getCurrency ()
```

Returns the currency of this object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/util/Currency` | this object's Currency <br /> |