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/text/CurrencyPluralInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#inhmethods)

# CurrencyPluralInfo

*** ** * ** ***

` public class CurrencyPluralInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/java/lang/Cloneable, https://developer.android.com/reference/java/io/Serializable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.icu.text.CurrencyPluralInfo |

<br />

*** ** * ** ***

This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar". DecimalFormat creates for itself an instance of CurrencyPluralInfo from its locale data. If you need to change any of these symbols, you can get the CurrencyPluralInfo object from your DecimalFormat and modify it. Following are the information needed for currency plural format and parse: locale information, plural rule of the locale, currency plural pattern of the locale.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#CurrencyPluralInfo()() ` Create a CurrencyPluralInfo object for the default `FORMAT` locale. |
| ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#CurrencyPluralInfo(android.icu.util.ULocale)(https://developer.android.com/reference/android/icu/util/ULocale locale) ` Create a CurrencyPluralInfo object for the given locale. |
| ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#CurrencyPluralInfo(java.util.Locale)(https://developer.android.com/reference/java/util/Locale locale) ` Create a CurrencyPluralInfo object for the given locale. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#clone()() ` Standard override |
| ` boolean` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object a) ` Override equals |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getCurrencyPluralPattern(java.lang.String)(https://developer.android.com/reference/java/lang/String pluralCount) ` Given a plural count, gets currency plural pattern of this locale, used for currency plural format |
| ` static https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getInstance(android.icu.util.ULocale)(https://developer.android.com/reference/android/icu/util/ULocale locale) ` Gets a CurrencyPluralInfo instance for the given locale. |
| ` static https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getInstance()() ` Gets a CurrencyPluralInfo instance for the default locale. |
| ` static https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getInstance(java.util.Locale)(https://developer.android.com/reference/java/util/Locale locale) ` Gets a CurrencyPluralInfo instance for the given locale. |
| ` https://developer.android.com/reference/android/icu/util/ULocale` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getLocale()() ` Get locale |
| ` https://developer.android.com/reference/android/icu/text/PluralRules` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#getPluralRules()() ` Gets plural rules of this locale, used for currency plural format |
| ` int` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#hashCode()() ` Override hashCode |
| ` void` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#setCurrencyPluralPattern(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String pluralCount, https://developer.android.com/reference/java/lang/String pattern) ` Set currency plural patterns. |
| ` void` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#setLocale(android.icu.util.ULocale)(https://developer.android.com/reference/android/icu/util/ULocale loc) ` Set locale. |
| ` void` | ` https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo#setPluralRules(java.lang.String)(https://developer.android.com/reference/java/lang/String ruleDescription) ` Set plural rules. |

### Inherited methods

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

### CurrencyPluralInfo

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

```
public CurrencyPluralInfo ()
```

Create a CurrencyPluralInfo object for the default `FORMAT` locale.

<br />

**See also:**

- `https://developer.android.com/reference/android/icu/util/ULocale.Category#FORMAT`

### CurrencyPluralInfo

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

```
public CurrencyPluralInfo (ULocale locale)
```

Create a CurrencyPluralInfo object for the given locale.

<br />

| Parameters ||
|---|---|
| `locale` | `ULocale`: the locale <br /> |

### CurrencyPluralInfo

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

```
public CurrencyPluralInfo (Locale locale)
```

Create a CurrencyPluralInfo object for the given locale.

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: the locale <br /> |

## Public methods

### clone

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

```
public Object clone ()
```

Standard override

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | a clone of this instance. <br /> |

### equals

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

```
public boolean equals (Object a)
```

Override equals

<br />

| Parameters ||
|---|---|
| `a` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getCurrencyPluralPattern

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

```
public String getCurrencyPluralPattern (String pluralCount)
```

Given a plural count, gets currency plural pattern of this locale, used for currency plural format

<br />

| Parameters ||
|---|---|
| `pluralCount` | `String`: currency plural count <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a currency plural pattern based on plural count <br /> |

### getInstance

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

```
public static CurrencyPluralInfo getInstance (ULocale locale)
```

Gets a CurrencyPluralInfo instance for the given locale.

<br />

| Parameters ||
|---|---|
| `locale` | `ULocale`: the locale. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | A CurrencyPluralInfo instance. <br /> |

### getInstance

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

```
public static CurrencyPluralInfo getInstance ()
```

Gets a CurrencyPluralInfo instance for the default locale.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | A CurrencyPluralInfo instance. <br /> |

### getInstance

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

```
public static CurrencyPluralInfo getInstance (Locale locale)
```

Gets a CurrencyPluralInfo instance for the given locale.

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: the locale. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CurrencyPluralInfo` | A CurrencyPluralInfo instance. <br /> |

### getLocale

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

```
public ULocale getLocale ()
```

Get locale

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/util/ULocale` | locale <br /> |

### getPluralRules

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

```
public PluralRules getPluralRules ()
```

Gets plural rules of this locale, used for currency plural format

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/PluralRules` | plural rule <br /> |

### hashCode

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

```
public int hashCode ()
```

Override hashCode

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### setCurrencyPluralPattern

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

```
public void setCurrencyPluralPattern (String pluralCount, 
                String pattern)
```

Set currency plural patterns. These are initially set in the constructor based on the locale, and usually do not need to be changed. The decimal digits part of the pattern cannot be specified via this method. All plural forms will use the same decimal pattern as set in the constructor of DecimalFormat. For example, you can't set "0.0" for plural "few" but "0.00" for plural "many".

<br />

| Parameters ||
|---|---|
| `pluralCount` | `String`: the plural count for which the currency pattern will be overridden. <br /> |
| `pattern` | `String`: the new currency plural pattern <br /> |

### setLocale

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

```
public void setLocale (ULocale loc)
```

Set locale. This also sets both the plural rules and the currency plural patterns to be the defaults for the locale.

<br />

| Parameters ||
|---|---|
| `loc` | `ULocale`: the new locale to set <br /> |

### setPluralRules

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

```
public void setPluralRules (String ruleDescription)
```

Set plural rules. These are initially set in the constructor based on the locale, and usually do not need to be changed.

<br />

| Parameters ||
|---|---|
| `ruleDescription` | `String`: new plural rule description <br /> |