/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public int getMinimunFractionDigits() { return formatter.getMinimumFractionDigits(); }
/** * Gets the minimum number of digits allowed in the fraction portion of a number. * For formatting numbers other than BigInteger and BigDecimal objects, the lower of the return value * and 340 is used. */ public int getMinimumFractionDigits(){ return format.getMinimumFractionDigits(); } /**
public int getMinimunFractionDigits() { return formatter.getMinimumFractionDigits(); }
/** * @return The minimum fraction digits to be used for formatting. */ @Nonnegative public int getMinimumFractionDigits () { return this.m_aCurrencyFormat.getMinimumFractionDigits (); }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** Sets the number of fractional decimal places to be displayed on the given * NumberFormat object to the value of the given integer. * @return The minimum and maximum fractional places settings that the * formatter had before this change, as an ImmutableList. */ private static ImmutableList<Integer> setFormatterDigits(DecimalFormat formatter, int min, int max) { ImmutableList<Integer> ante = ImmutableList.of( formatter.getMinimumFractionDigits(), formatter.getMaximumFractionDigits() ); formatter.setMinimumFractionDigits(min); formatter.setMaximumFractionDigits(max); return ante; }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
/** Sets the number of fractional decimal places to be displayed on the given * NumberFormat object to the value of the given integer. * @return The minimum and maximum fractional places settings that the * formatter had before this change, as an ImmutableList. */ private static ImmutableList<Integer> setFormatterDigits(DecimalFormat formatter, int min, int max) { ImmutableList<Integer> ante = ImmutableList.of( formatter.getMinimumFractionDigits(), formatter.getMaximumFractionDigits() ); formatter.setMinimumFractionDigits(min); formatter.setMaximumFractionDigits(max); return ante; }
/** Sets the number of fractional decimal places to be displayed on the given * NumberFormat object to the value of the given integer. * @return The minimum and maximum fractional places settings that the * formatter had before this change, as an ImmutableList. */ private static ImmutableList<Integer> setFormatterDigits(DecimalFormat formatter, int min, int max) { ImmutableList<Integer> ante = ImmutableList.of( formatter.getMinimumFractionDigits(), formatter.getMaximumFractionDigits() ); formatter.setMinimumFractionDigits(min); formatter.setMaximumFractionDigits(max); return ante; }
/** Sets the number of fractional decimal places to be displayed on the given * NumberFormat object to the value of the given integer. * @return The minimum and maximum fractional places settings that the * formatter had before this change, as an ImmutableList. */ private static ImmutableList<Integer> setFormatterDigits(DecimalFormat formatter, int min, int max) { ImmutableList<Integer> ante = ImmutableList.of( formatter.getMinimumFractionDigits(), formatter.getMaximumFractionDigits() ); formatter.setMinimumFractionDigits(min); formatter.setMaximumFractionDigits(max); return ante; }
/** * Sets the minimum number of digits after the decimal point. * If the value passed is negative then it is replaced by 0. * Regardless of this setting, no more than 340 digits will be used. * * @param value the minimum number of fraction digits. */ @Override public void setMinimumFractionDigits(int value) { super.setMinimumFractionDigits(value); ndf.setMinimumFractionDigits(getMinimumFractionDigits()); }
@Override public int getMinFractionDigits() { return getFormatInternal().getMinimumFractionDigits(); }
@Override public int getMinFractionDigits() { return getFormatInternal().getMinimumFractionDigits(); }
/** Return a new {@link BtcFormat} instance. The object returned will be configured according * to the state of this <code>Builder</code> instance at the time this method is invoked. */ public BtcFormat build() { BtcFormat f = variant.newInstance(this); if (symbol != "" || code != "") { synchronized(f.numberFormat) { DecimalFormatSymbols defaultSigns = f.numberFormat.getDecimalFormatSymbols(); setSymbolAndCode(f.numberFormat, symbol != "" ? symbol : defaultSigns.getCurrencySymbol(), code != "" ? code : defaultSigns.getInternationalCurrencySymbol() ); }} if (localizedPattern != "" || pattern != "") { int places = f.numberFormat.getMinimumFractionDigits(); if (localizedPattern != "") f.numberFormat.applyLocalizedPattern(negify(localizedPattern)); else f.numberFormat.applyPattern(negify(pattern)); f.numberFormat.setMinimumFractionDigits(places); f.numberFormat.setMaximumFractionDigits(places); } return f; }
/** Return a new {@link BtcFormat} instance. The object returned will be configured according * to the state of this {@code Builder} instance at the time this method is invoked. */ public BtcFormat build() { BtcFormat f = variant.newInstance(this); if (symbol != "" || code != "") { synchronized(f.numberFormat) { DecimalFormatSymbols defaultSigns = f.numberFormat.getDecimalFormatSymbols(); setSymbolAndCode(f.numberFormat, symbol != "" ? symbol : defaultSigns.getCurrencySymbol(), code != "" ? code : defaultSigns.getInternationalCurrencySymbol() ); }} if (localizedPattern != "" || pattern != "") { int places = f.numberFormat.getMinimumFractionDigits(); if (localizedPattern != "") f.numberFormat.applyLocalizedPattern(negify(localizedPattern)); else f.numberFormat.applyPattern(negify(pattern)); f.numberFormat.setMinimumFractionDigits(places); f.numberFormat.setMaximumFractionDigits(places); } return f; }
/** Return a new {@link BtcFormat} instance. The object returned will be configured according * to the state of this <code>Builder</code> instance at the time this method is invoked. */ public BtcFormat build() { BtcFormat f = variant.newInstance(this); if (symbol != "" || code != "") { synchronized(f.numberFormat) { DecimalFormatSymbols defaultSigns = f.numberFormat.getDecimalFormatSymbols(); setSymbolAndCode(f.numberFormat, symbol != "" ? symbol : defaultSigns.getCurrencySymbol(), code != "" ? code : defaultSigns.getInternationalCurrencySymbol() ); }} if (localizedPattern != "" || pattern != "") { int places = f.numberFormat.getMinimumFractionDigits(); if (localizedPattern != "") f.numberFormat.applyLocalizedPattern(negify(localizedPattern)); else f.numberFormat.applyPattern(negify(pattern)); f.numberFormat.setMinimumFractionDigits(places); f.numberFormat.setMaximumFractionDigits(places); } return f; }