@Override public char getDecimalSeparator() { return fIcuDecfs.getDecimalSeparator(); }
private static String stripZeros(final DecimalFormat decf, final String fmtd) { char decsep = decf.getDecimalFormatSymbols().getDecimalSeparator(); return fmtd.replaceAll("\\" + decsep + "00", EMPTY); }
private void setDecimalSymbols(ULocale uLocale) { // decimal point for seconds DecimalFormatSymbols dfs = new DecimalFormatSymbols(uLocale); setDecimal(String.valueOf(dfs.getDecimalSeparator())); }
/** * Determine the best fraction rule to use. Rules matching the decimal point from * DecimalFormatSymbols become the main set of rules to use. * @param originalIndex The index into nonNumericalRules * @param newRule The new rule to consider * @param rememberRule Should the new rule be added to fractionRules. */ private void setBestFractionRule(int originalIndex, NFRule newRule, boolean rememberRule) { if (rememberRule) { if (fractionRules == null) { fractionRules = new LinkedList<NFRule>(); } fractionRules.add(newRule); } NFRule bestResult = nonNumericalRules[originalIndex]; if (bestResult == null) { nonNumericalRules[originalIndex] = newRule; } else { // We have more than one. Which one is better? DecimalFormatSymbols decimalFormatSymbols = owner.getDecimalFormatSymbols(); if (decimalFormatSymbols.getDecimalSeparator() == newRule.getDecimalPoint()) { nonNumericalRules[originalIndex] = newRule; } // else leave it alone } }
if (ch == symbols.getDecimalSeparator() || ch == symbols.getGroupingSeparator()) { buffer.append(QUOTE); buffer.append(ch);
result.append(localized ? symbols.getDecimalSeparator() : PATTERN_DECIMAL_SEPARATOR);
sigDigit = symbols.getSignificantDigit(); groupingSeparator = symbols.getGroupingSeparator(); decimalSeparator = symbols.getDecimalSeparator(); percent = symbols.getPercent(); perMill = symbols.getPerMill();