Package com.ibm.icu.impl.number
Class CustomSymbolCurrency
- java.lang.Object
-
- com.ibm.icu.util.MeasureUnit
-
- com.ibm.icu.util.Currency
-
- com.ibm.icu.impl.number.CustomSymbolCurrency
-
- All Implemented Interfaces:
java.io.Serializable
public class CustomSymbolCurrency extends Currency
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.icu.util.Currency
Currency.CurrencyStringInfo, Currency.CurrencyUsage
-
Nested classes/interfaces inherited from class com.ibm.icu.util.MeasureUnit
MeasureUnit.Complexity, MeasureUnit.Factory, MeasureUnit.MeasurePrefix
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private java.lang.String
symbol1
private java.lang.String
symbol2
-
Fields inherited from class com.ibm.icu.util.Currency
FORMAL_SYMBOL_NAME, LONG_NAME, NARROW_SYMBOL_NAME, PLURAL_LONG_NAME, SYMBOL_NAME, VARIANT_SYMBOL_NAME
-
Fields inherited from class com.ibm.icu.util.MeasureUnit
ACRE, ACRE_FOOT, AMPERE, ARC_MINUTE, ARC_SECOND, ASTRONOMICAL_UNIT, ATMOSPHERE, BAR, BARREL, BEAUFORT, BIT, BRITISH_THERMAL_UNIT, BUSHEL, BYTE, CALORIE, CANDELA, CARAT, CELSIUS, CENTILITER, CENTIMETER, CENTURY, CUBIC_CENTIMETER, CUBIC_FOOT, CUBIC_INCH, CUBIC_KILOMETER, CUBIC_METER, CUBIC_MILE, CUBIC_YARD, CUP, CUP_METRIC, DALTON, DAY, DAY_PERSON, DECADE, DECILITER, DECIMETER, DEGREE, DESSERT_SPOON, DESSERT_SPOON_IMPERIAL, DOT, DOT_PER_CENTIMETER, DOT_PER_INCH, DRAM, DROP, DUNAM, EARTH_MASS, EARTH_RADIUS, ELECTRONVOLT, EM, FAHRENHEIT, FATHOM, FLUID_OUNCE, FLUID_OUNCE_IMPERIAL, FOODCALORIE, FOOT, FURLONG, G_FORCE, GALLON, GALLON_IMPERIAL, GASOLINE_ENERGY_DENSITY, GENERIC_TEMPERATURE, GIGABIT, GIGABYTE, GIGAHERTZ, GIGAWATT, GRAIN, GRAM, HECTARE, HECTOLITER, HECTOPASCAL, HERTZ, HORSEPOWER, HOUR, INCH, INCH_HG, ITEM, JIGGER, JOULE, KARAT, KELVIN, KILOBIT, KILOBYTE, KILOCALORIE, KILOGRAM, KILOHERTZ, KILOJOULE, KILOMETER, KILOMETER_PER_HOUR, KILOPASCAL, KILOWATT, KILOWATT_HOUR, KILOWATT_HOUR_PER_100_KILOMETER, KNOT, LIGHT_SPEED, LIGHT_YEAR, LITER, LITER_PER_100KILOMETERS, LITER_PER_KILOMETER, LUMEN, LUX, MEGABIT, MEGABYTE, MEGAHERTZ, MEGALITER, MEGAPASCAL, MEGAPIXEL, MEGAWATT, METER, METER_PER_SECOND, METER_PER_SECOND_SQUARED, METRIC_TON, MICROGRAM, MICROMETER, MICROSECOND, MILE, MILE_PER_GALLON, MILE_PER_GALLON_IMPERIAL, MILE_PER_HOUR, MILE_SCANDINAVIAN, MILLIAMPERE, MILLIBAR, MILLIGRAM, MILLIGRAM_OFGLUCOSE_PER_DECILITER, MILLIGRAM_PER_DECILITER, MILLILITER, MILLIMETER, MILLIMETER_OF_MERCURY, MILLIMOLE_PER_LITER, MILLISECOND, MILLIWATT, MINUTE, MOLE, MONTH, MONTH_PERSON, NANOMETER, NANOSECOND, NAUTICAL_MILE, NEWTON, NEWTON_METER, NIGHT, OHM, OUNCE, OUNCE_TROY, PARSEC, PART_PER_MILLION, PASCAL, PERCENT, PERMILLE, PERMYRIAD, PETABYTE, PICOMETER, PINCH, PINT, PINT_METRIC, PIXEL, PIXEL_PER_CENTIMETER, PIXEL_PER_INCH, POINT, POUND, POUND_FOOT, POUND_FORCE, POUND_PER_SQUARE_INCH, QUART, QUART_IMPERIAL, QUARTER, RADIAN, REVOLUTION_ANGLE, SECOND, SOLAR_LUMINOSITY, SOLAR_MASS, SOLAR_RADIUS, SQUARE_CENTIMETER, SQUARE_FOOT, SQUARE_INCH, SQUARE_KILOMETER, SQUARE_METER, SQUARE_MILE, SQUARE_YARD, STONE, subType, TABLESPOON, TEASPOON, TERABIT, TERABYTE, THERM_US, TON, TONNE, type, VOLT, WATT, WEEK, WEEK_PERSON, YARD, YEAR, YEAR_PERSON
-
-
Constructor Summary
Constructors Constructor Description CustomSymbolCurrency(java.lang.String isoCode, java.lang.String currency1Sym, java.lang.String currency2Sym)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getCurrencyCode()
Returns the ISO 4217 3-letter code for this currency object.java.lang.String
getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)
Returns the display name for the given currency in the given locale.java.lang.String
getName(ULocale locale, int nameStyle, java.lang.String pluralCount, boolean[] isChoiceFormat)
Returns the display name for the given currency in the given locale.int
hashCode()
static Currency
resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols)
-
Methods inherited from class com.ibm.icu.util.Currency
fromJavaCurrency, getAvailableCurrencies, getAvailableCurrencyCodes, getAvailableCurrencyCodes, getAvailableLocales, getAvailableULocales, getDefaultFractionDigits, getDefaultFractionDigits, getDisplayName, getDisplayName, getInstance, getInstance, getInstance, getKeywordValuesForLocale, getName, getName, getNumericCode, getParsingTrie, getRoundingIncrement, getRoundingIncrement, getSymbol, getSymbol, getSymbol, isAvailable, parse, registerInstance, toJavaCurrency, toString, unregister
-
Methods inherited from class com.ibm.icu.util.MeasureUnit
addUnit, findBySubType, forIdentifier, fromMeasureUnitImpl, getAvailable, getAvailable, getAvailableTypes, getComplexity, getCopyOfMeasureUnitImpl, getDimensionality, getIdentifier, getPrefix, getSubtype, getType, internalGetInstance, product, reciprocal, splitToSingleUnits, withDimensionality, withPrefix
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
symbol1
private java.lang.String symbol1
-
symbol2
private java.lang.String symbol2
-
-
Method Detail
-
resolve
public static Currency resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols)
-
getName
public java.lang.String getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)
Description copied from class:Currency
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 "$".- Overrides:
getName
in classCurrency
- Parameters:
locale
- locale in which to display currencynameStyle
- selector for which kind of name to return. The nameStyle should be SYMBOL_NAME, NARROW_SYMBOL_NAME, or LONG_NAME. Otherwise, throw IllegalArgumentException.isChoiceFormat
- 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:
- display string for this currency. If the resource data contains no entry for this currency, then the ISO 4217 code is returned.
- See Also:
Currency.getName(ULocale, int, String, boolean[])
-
getName
public java.lang.String getName(ULocale locale, int nameStyle, java.lang.String pluralCount, boolean[] isChoiceFormat)
Description copied from class:Currency
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".- Overrides:
getName
in classCurrency
- Parameters:
locale
- locale in which to display currencynameStyle
- selector for which kind of name to returnpluralCount
- plural count string for this localeisChoiceFormat
- 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:
- display string for this currency. If the resource data contains no entry for this currency, then the ISO 4217 code is returned.
-
getCurrencyCode
public java.lang.String getCurrencyCode()
Description copied from class:Currency
Returns the ISO 4217 3-letter code for this currency object.- Overrides:
getCurrencyCode
in classCurrency
-
hashCode
public int hashCode()
Description copied from class:MeasureUnit
- Overrides:
hashCode
in classMeasureUnit
-
equals
public boolean equals(java.lang.Object other)
Description copied from class:MeasureUnit
- Overrides:
equals
in classMeasureUnit
-
-