private CurrencyAffixPatterns(ULocale uloc) {
// Get the basic currency pattern.
- String pattern = NumberFormat.getPattern(uloc, NumberFormat.CURRENCYSTYLE);
+ String pattern = NumberFormat.getPatternForStyle(uloc, NumberFormat.CURRENCYSTYLE);
addPattern(pattern);
// Get the currency plural patterns.
ULocale uloc = symbols.getULocale();
String pattern;
if (fingerprint.compactType == CompactType.CURRENCY) {
- pattern = NumberFormat.getPattern(uloc, NumberFormat.CURRENCYSTYLE);
+ pattern = NumberFormat.getPatternForStyle(uloc, NumberFormat.CURRENCYSTYLE);
} else {
- pattern = NumberFormat.getPattern(uloc, NumberFormat.NUMBERSTYLE);
+ pattern = NumberFormat.getPatternForStyle(uloc, NumberFormat.NUMBERSTYLE);
}
// TODO: Clean this up; avoid the extra object creations.
// TODO: Currency may also need to override grouping settings, not just affixes.
* @param choice the pattern format.
* @return the pattern
* @stable ICU 3.2
+ */
+ protected static String getPattern(ULocale forLocale, int choice) {
+ return getPatternForStyle(forLocale, choice);
+ }
+
+ /**
+ * Returns the pattern for the provided locale and choice.
+ * @param forLocale the locale of the data.
+ * @param choice the pattern format.
+ * @return the pattern
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
- public static String getPattern(ULocale forLocale, int choice) {
+ public static String getPatternForStyle(ULocale forLocale, int choice) {
/* for ISOCURRENCYSTYLE and PLURALCURRENCYSTYLE,
* the pattern is the same as the pattern of CURRENCYSTYLE
* but by replacing the single currency sign with