Top Fields Constructors Methods
com.ibm.icu.impl.number

public Class CustomSymbolCurrency

extends Currency
Class Inheritance
Imports
com.ibm.icu.text.DecimalFormatSymbols, com.ibm.icu.util.Currency, .ULocale

Field Summary

Modifier and TypeField and Description
private static final long
private String
private String
Inherited from com.ibm.icu.util.Currency:
FORMAL_SYMBOL_NAMELONG_NAMENARROW_SYMBOL_NAMEPLURAL_LONG_NAMESYMBOL_NAMEVARIANT_SYMBOL_NAME

Constructor Summary

AccessConstructor and Description
public
CustomSymbolCurrency(String isoCode, String currency1Sym, String currency2Sym)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides com.ibm.icu.util.MeasureUnit.equals.

Indicates whether some other object is "equal to" this one.
public String
getCurrencyCode()

Overrides com.ibm.icu.util.Currency.getCurrencyCode.

Returns the ISO 4217 3-letter code for this currency object.
public String
getName(ULocale
locale in which to display currency
locale
,
int
selector for which kind of name to return. The nameStyle should be SYMBOL_NAME, NARROW_SYMBOL_NAME, or LONG_NAME. Otherwise, throw IllegalArgumentException.
nameStyle
,
boolean[]
isChoiceFormat[0] is always set to false, or isChoiceFormat can be null; display names are static strings; since ICU 4.4, ChoiceFormat patterns are no longer supported
isChoiceFormat
)

Overrides com.ibm.icu.util.Currency.getName.

Returns the display name for the given currency in the given locale.
public String
getName(ULocale
locale in which to display currency
locale
,
int
selector for which kind of name to return
nameStyle
,
String
plural count string for this locale
pluralCount
,
boolean[]
isChoiceFormat[0] is always set to false, or isChoiceFormat can be null; display names are static strings; since ICU 4.4, ChoiceFormat patterns are no longer supported
isChoiceFormat
)

Overrides com.ibm.icu.util.Currency.getName.

Returns the display name for the given currency in the given locale.
public int
hashCode()

Overrides com.ibm.icu.util.MeasureUnit.hashCode.

Returns a hash code value for the object.
public static Currency
resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols)

Inherited from com.ibm.icu.util.Currency:
fromJavaCurrencygetAvailableCurrenciesgetAvailableCurrencyCodesgetAvailableCurrencyCodesgetAvailableLocalesgetAvailableULocalesgetDefaultFractionDigitsgetDefaultFractionDigitsgetDisplayNamegetDisplayNamegetInstancegetInstancegetInstancegetKeywordValuesForLocalegetNamegetNamegetNumericCodegetParsingTriegetRoundingIncrementgetRoundingIncrementgetSymbolgetSymbolgetSymbolisAvailableparseregisterInstancetoJavaCurrencytoStringunregister

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.ibm.icu.util.Currency.serialVersionUID.

symbol1back to summary
private String symbol1
symbol2back to summary
private String symbol2

Constructor Detail

CustomSymbolCurrencyback to summary
public CustomSymbolCurrency(String isoCode, String currency1Sym, String currency2Sym)

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides com.ibm.icu.util.MeasureUnit.equals.

Doc from com.ibm.icu.util.MeasureUnit.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getCurrencyCodeback to summary
public String getCurrencyCode()

Overrides com.ibm.icu.util.Currency.getCurrencyCode.

Doc from com.ibm.icu.util.Currency.getCurrencyCode.

Returns the ISO 4217 3-letter code for this currency object.

Annotations
@Override
getNameback to summary
public String getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)

Overrides com.ibm.icu.util.Currency.getName.

Doc from com.ibm.icu.util.Currency.getName.

Returns the display name for the given currency in the given locale. For example, the display name for the USD currency object in the en_US locale is "$".

Parameters
locale:ULocale

locale in which to display currency

nameStyle:int

selector for which kind of name to return. The nameStyle should be SYMBOL_NAME, NARROW_SYMBOL_NAME, or LONG_NAME. Otherwise, throw IllegalArgumentException.

isChoiceFormat:boolean[]

isChoiceFormat[0] is always set to false, or isChoiceFormat can be null; display names are static strings; since ICU 4.4, ChoiceFormat patterns are no longer supported

Returns:String

display string for this currency. If the resource data contains no entry for this currency, then the ISO 4217 code is returned.

Annotations
@Override
getNameback to summary
public String getName(ULocale locale, int nameStyle, String pluralCount, boolean[] isChoiceFormat)

Overrides com.ibm.icu.util.Currency.getName.

Doc from com.ibm.icu.util.Currency.getName.

Returns the display name for the given currency in the given locale. For example, the SYMBOL_NAME for the USD currency object in the en_US locale is "$". The PLURAL_LONG_NAME for the USD currency object when the currency amount is plural is "US dollars", such as in "3.00 US dollars"; while the PLURAL_LONG_NAME for the USD currency object when the currency amount is singular is "US dollar", such as in "1.00 US dollar".

Parameters
locale:ULocale

locale in which to display currency

nameStyle:int

selector for which kind of name to return

pluralCount:String

plural count string for this locale

isChoiceFormat:boolean[]

isChoiceFormat[0] is always set to false, or isChoiceFormat can be null; display names are static strings; since ICU 4.4, ChoiceFormat patterns are no longer supported

Returns:String

display string for this currency. If the resource data contains no entry for this currency, then the ISO 4217 code is returned.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.ibm.icu.util.MeasureUnit.hashCode.

Doc from com.ibm.icu.util.MeasureUnit.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
resolveback to summary
public static Currency resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols)