NFRule rule = nonNumericalRules[INFINITY_RULE_INDEX]; if (rule == null) { rule = owner.getDefaultInfinityRule();
/** * Sets the decimal format symbols used by this formatter. The formatter uses a copy of the * provided symbols. * * @param newSymbols desired DecimalFormatSymbols * @see DecimalFormatSymbols * @stable ICU 49 */ public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) { if (newSymbols != null) { decimalFormatSymbols = (DecimalFormatSymbols) newSymbols.clone(); if (decimalFormat != null) { decimalFormat.setDecimalFormatSymbols(decimalFormatSymbols); } if (defaultInfinityRule != null) { defaultInfinityRule = null; getDefaultInfinityRule(); // Reset with the new DecimalFormatSymbols } if (defaultNaNRule != null) { defaultNaNRule = null; getDefaultNaNRule(); // Reset with the new DecimalFormatSymbols } // Apply the new decimalFormatSymbols by reparsing the rulesets for (NFRuleSet ruleSet : ruleSets) { ruleSet.setDecimalFormatSymbols(decimalFormatSymbols); } } }