/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
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()); }
private void writeObject(ObjectOutputStream stream) throws IOException { ObjectOutputStream.PutField fields = stream.putFields(); fields.put("currencySymbol", currencySymbol); fields.put("decimalSeparator", getDecimalSeparator()); fields.put("digit", getDigit()); fields.put("exponential", exponentSeparator.charAt(0)); fields.put("exponentialSeparator", exponentSeparator); fields.put("groupingSeparator", getGroupingSeparator()); fields.put("infinity", infinity); fields.put("intlCurrencySymbol", intlCurrencySymbol); fields.put("minusSign", getMinusSign()); fields.put("monetarySeparator", getMonetaryDecimalSeparator()); fields.put("NaN", NaN); fields.put("patternSeparator", getPatternSeparator()); fields.put("percent", getPercent()); fields.put("perMill", getPerMill()); fields.put("serialVersionOnStream", 3); fields.put("zeroDigit", getZeroDigit()); fields.put("locale", locale); stream.writeFields(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
/** * Return the character used for zero. Different for Arabic, etc. * @return the character * @stable ICU 2.0 */ public char getZeroDigit() { return dfs.getZeroDigit(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
/** * Get the "zero-digit" attribute. * zero-digit specifies the character used as the digit zero; the default * value is the digit zero (0). * * @return Character to use as the digit zero */ public char getZeroDigit() { return m_dfs.getZeroDigit(); }
private static DecimalStyle create(Locale locale) { DecimalFormatSymbols oldSymbols = DecimalFormatSymbols.getInstance(locale); char zeroDigit = oldSymbols.getZeroDigit(); char positiveSign = '+'; char negativeSign = oldSymbols.getMinusSign(); char decimalSeparator = oldSymbols.getDecimalSeparator(); if (zeroDigit == '0' && negativeSign == '-' && decimalSeparator == '.') { return STANDARD; } return new DecimalStyle(zeroDigit, positiveSign, negativeSign, decimalSeparator); }
private static DecimalStyle create(Locale locale) { DecimalFormatSymbols oldSymbols = DecimalFormatSymbols.getInstance(locale); char zeroDigit = oldSymbols.getZeroDigit(); char positiveSign = '+'; char negativeSign = oldSymbols.getMinusSign(); char decimalSeparator = oldSymbols.getDecimalSeparator(); if (zeroDigit == '0' && negativeSign == '-' && decimalSeparator == '.') { return STANDARD; } return new DecimalStyle(zeroDigit, positiveSign, negativeSign, decimalSeparator); }
/** * Configure this instance with values from a {@link Locale}. */ public MonetaryFormat withLocale(Locale locale) { DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale); char negativeSign = dfs.getMinusSign(); char zeroDigit = dfs.getZeroDigit(); char decimalMark = dfs.getMonetaryDecimalSeparator(); return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); }
/** * Configure this instance with values from a {@link Locale}. */ public MonetaryFormat withLocale(Locale locale) { DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale); char negativeSign = dfs.getMinusSign(); char zeroDigit = dfs.getZeroDigit(); char decimalMark = dfs.getMonetaryDecimalSeparator(); return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); }
private static DecimalStyle create(Locale locale) { DecimalFormatSymbols oldSymbols = DecimalFormatSymbols.getInstance(locale); char zeroDigit = oldSymbols.getZeroDigit(); char positiveSign = '+'; char negativeSign = oldSymbols.getMinusSign(); char decimalSeparator = oldSymbols.getDecimalSeparator(); if (zeroDigit == '0' && negativeSign == '-' && decimalSeparator == '.') { return STANDARD; } return new DecimalStyle(zeroDigit, positiveSign, negativeSign, decimalSeparator); }
/** * 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()); }