summaryrefslogtreecommitdiffstats
path: root/icu/src/main/java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-04-16 11:06:58 -0700
committerElliott Hughes <enh@google.com>2010-04-16 11:06:58 -0700
commitb7e820b92c7345cdc0cd4fea50954289ae66eb67 (patch)
tree4cb16a5101296e3a89f8c869073b5352f3020953 /icu/src/main/java
parente875cc0c3dc0ecb816fc154ddcfba38c064d00e2 (diff)
downloadlibcore-b7e820b92c7345cdc0cd4fea50954289ae66eb67.zip
libcore-b7e820b92c7345cdc0cd4fea50954289ae66eb67.tar.gz
libcore-b7e820b92c7345cdc0cd4fea50954289ae66eb67.tar.bz2
Change DecimalFormatSymbols to have a field per symbol.
I'd been wanting to do this for some time, but cleaning up the recent performance changes I made to Formatter was the final straw. Change-Id: I6d516de66a0bed5e759bca590b4cc124ce2eb712
Diffstat (limited to 'icu/src/main/java')
-rw-r--r--icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java50
1 files changed, 45 insertions, 5 deletions
diff --git a/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java b/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java
index e8572a2..0ba18d1 100644
--- a/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java
+++ b/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java
@@ -50,8 +50,16 @@ public final class LocaleData {
public String mediumDateFormat;
public String shortDateFormat;
- public String decimalPatternChars;
-
+ // DecimalFormatSymbols.
+ public char zeroDigit;
+ public char digit;
+ public char decimalSeparator;
+ public char groupingSeparator;
+ public char patternSeparator;
+ public char percent;
+ public char perMill;
+ public char monetarySeparator;
+ public char minusSign;
public String exponentSeparator;
public String infinity;
public String NaN;
@@ -82,7 +90,15 @@ public final class LocaleData {
"longDateFormat=" + longDateFormat + "," +
"mediumDateFormat=" + mediumDateFormat + "," +
"shortDateFormat=" + shortDateFormat + "," +
- "decimalPatternChars=" + decimalPatternChars + "," +
+ "zeroDigit=" + zeroDigit + "," +
+ "digit=" + digit + "," +
+ "decimalSeparator=" + decimalSeparator + "," +
+ "groupingSeparator=" + groupingSeparator + "," +
+ "patternSeparator=" + patternSeparator + "," +
+ "percent=" + percent + "," +
+ "perMill=" + perMill + "," +
+ "monetarySeparator=" + monetarySeparator + "," +
+ "minusSign=" + minusSign + "," +
"exponentSeparator=" + exponentSeparator + "," +
"infinity=" + infinity + "," +
"NaN=" + NaN + "," +
@@ -143,8 +159,32 @@ public final class LocaleData {
if (overrides.shortDateFormat != null) {
shortDateFormat = overrides.shortDateFormat;
}
- if (overrides.decimalPatternChars != null) {
- decimalPatternChars = overrides.decimalPatternChars;
+ if (overrides.zeroDigit != '\0') {
+ zeroDigit = overrides.zeroDigit;
+ }
+ if (overrides.digit != '\0') {
+ digit = overrides.digit;
+ }
+ if (overrides.decimalSeparator != '\0') {
+ decimalSeparator = overrides.decimalSeparator;
+ }
+ if (overrides.groupingSeparator != '\0') {
+ groupingSeparator = overrides.groupingSeparator;
+ }
+ if (overrides.patternSeparator != '\0') {
+ patternSeparator = overrides.patternSeparator;
+ }
+ if (overrides.percent != '\0') {
+ percent = overrides.percent;
+ }
+ if (overrides.perMill != '\0') {
+ perMill = overrides.perMill;
+ }
+ if (overrides.monetarySeparator != '\0') {
+ monetarySeparator = overrides.monetarySeparator;
+ }
+ if (overrides.minusSign != '\0') {
+ minusSign = overrides.minusSign;
}
if (overrides.exponentSeparator != null) {
exponentSeparator = overrides.exponentSeparator;