]> granicus.if.org Git - icu/commitdiff
ICU-7467 Added @internal NumberFormat#getPatternForStyle and reverted API signature...
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 27 Mar 2017 19:13:58 +0000 (19:13 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 27 Mar 2017 19:13:58 +0000 (19:13 +0000)
X-SVN-Rev: 39944

icu4j/main/classes/core/src/com/ibm/icu/impl/number/Parse.java
icu4j/main/classes/core/src/com/ibm/icu/impl/number/formatters/CompactDecimalFormat.java
icu4j/main/classes/core/src/com/ibm/icu/text/NumberFormat.java

index 8e9897ea4bdb0f3b748b257fd2063909cc6ef617..ae8d6d91f20cbe5a0551e246464001c27802c4d6 100644 (file)
@@ -852,7 +852,7 @@ public class Parse {
 
     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.
index f7be488ec8c4d2a747ad3f5c769a1b5baace3013..ca88b970bd39bfda73a36de4fda5d78411fa979e 100644 (file)
@@ -163,9 +163,9 @@ public class CompactDecimalFormat extends Format.BeforeFormat {
     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.
index 80f8d944c00382bc88e0de8a95c9c7f7fdcb3642..a6803d34a0aeb60f316071034e24369bbe0c5eff 100644 (file)
@@ -1462,11 +1462,21 @@ public abstract class NumberFormat extends UFormat {
      * @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