/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
if (tokenBuilder.toString().equals(dfs.getNaN())) { result.append("NaN"); } else if (tokenBuilder.toString().equals(dfs.getInfinity())) { result.append("Infinity"); } else {
private Pattern getFloatPattern() { if (decimalFormat == null) { decimalFormat = (DecimalFormat) NumberFormat.getInstance(locale); } if (cachedFloatPattern != null) { return cachedFloatPattern; } DecimalFormatSymbols dfs = decimalFormat.getDecimalFormatSymbols(); String digit = "([0-9]|(\\p{javaDigit}))"; String nonZeroDigit = "[\\p{javaDigit}&&[^0]]"; String numeral = getNumeral(digit, nonZeroDigit); String decimalSeparator = "\\" + dfs.getDecimalSeparator(); String decimalNumeral = "(" + numeral + "|" + numeral + decimalSeparator + digit + "*+|" + decimalSeparator + digit + "++)"; String exponent = "([eE][+-]?" + digit + "+)?"; String decimal = "(([-+]?" + decimalNumeral + "(" + exponent + "?)" + ")|" + "(" + addPositiveSign(decimalNumeral) + "(" + exponent + "?)" + ")|" + "(" + addNegativeSign(decimalNumeral) + "(" + exponent + "?)" + "))"; String hexFloat = "([-+]?0[xX][0-9a-fA-F]*\\.[0-9a-fA-F]+([pP][-+]?[0-9]+)?)"; String localNaN = dfs.getNaN(); String localeInfinity = dfs.getInfinity(); String nonNumber = "(NaN|\\Q" + localNaN + "\\E|Infinity|\\Q" + localeInfinity + "\\E)"; String signedNonNumber = "((([-+]?(" + nonNumber + ")))|" + "(" + addPositiveSign(nonNumber) + ")|" + "(" + addNegativeSign(nonNumber) + "))"; cachedFloatPattern = Pattern.compile(decimal + "|" + hexFloat + "|" + signedNonNumber); return cachedFloatPattern; }
public NativeDecimalFormat(String pattern, DecimalFormatSymbols dfs) { try { this.address = open(pattern, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); this.lastPattern = pattern; } catch (NullPointerException npe) { throw npe; } catch (RuntimeException re) { throw new IllegalArgumentException("syntax error: " + re.getMessage() + ": " + pattern); } }
/** * Copies the DecimalFormatSymbols settings into our native peer in bulk. */ public void setDecimalFormatSymbols(final DecimalFormatSymbols dfs) { setDecimalFormatSymbols(this.address, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); }
/** * Return the String used to represent infinity. Almost always left * unchanged. * @return the Infinity string * @stable ICU 2.0 */ public String getInfinity() { return dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Get the "infinity" attribute. * infinity specifies the string used to represent infinity; * the default value is the string Infinity. * * @return String to use as the "infinity" attribute. */ public String getInfinity() { return m_dfs.getInfinity(); }
/** * Return the String used to represent infinity. Almost always left * unchanged. * @return the Infinity string * @stable ICU 2.0 */ public String getInfinity() { return dfs.getInfinity(); }
/** * @return Gets the string used to represent infinity. Almost always left unchanged. */ public String getInfinity() { return formatSymbols.getInfinity(); } /**
protected String prepareText(String aText, DecimalFormatSymbols dfs) { String userString = aText.replaceAll(dfs.getCurrencySymbol(), ""); userString = userString.replaceAll(dfs.getInternationalCurrencySymbol(), ""); userString = userString.replaceAll(dfs.getExponentSeparator(), ""); userString = userString.replaceAll(dfs.getInfinity(), ""); userString = userString.replaceAll(dfs.getNaN(), ""); userString = userString.replaceAll(new String(new char[]{dfs.getGroupingSeparator()}), ""); userString = userString.replaceAll(new String(new char[]{dfs.getMinusSign()}), ""); userString = userString.replaceAll(new String(new char[]{dfs.getPerMill()}), ""); userString = userString.replaceAll(new String(new char[]{dfs.getPercent()}), ""); return userString; }
/** * Copies the DecimalFormatSymbols settings into our native peer in bulk. */ public void setDecimalFormatSymbols(final DecimalFormatSymbols dfs) { setDecimalFormatSymbols(this.address, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); }
/** * Copies the DecimalFormatSymbols settings into our native peer in bulk. */ public void setDecimalFormatSymbols(final DecimalFormatSymbols dfs) { setDecimalFormatSymbols(this.address, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); }
/** * Copies the DecimalFormatSymbols settings into our native peer in bulk. */ public void setDecimalFormatSymbols(final DecimalFormatSymbols dfs) { setDecimalFormatSymbols(this.address, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); }
/** * Copies the DecimalFormatSymbols settings into our native peer in bulk. */ public void setDecimalFormatSymbols(final DecimalFormatSymbols dfs) { setDecimalFormatSymbols(this.address, dfs.getCurrencySymbol(), dfs.getDecimalSeparator(), dfs.getDigit(), dfs.getExponentSeparator(), dfs.getGroupingSeparator(), dfs.getInfinity(), dfs.getInternationalCurrencySymbol(), dfs.getMinusSign(), dfs.getMonetaryDecimalSeparator(), dfs.getNaN(), dfs.getPatternSeparator(), dfs.getPercent(), dfs.getPerMill(), dfs.getZeroDigit()); }