/** * Sets the minimum number of digits allowed in the integer portion of a number. This * override limits the integer digit count to 309. * * @see NumberFormat#setMinimumIntegerDigits * @stable ICU 2.0 */ public void setMinimumIntegerDigits(int newValue) { super.setMinimumIntegerDigits(newValue); }
/** * Sets the minimum number of digits allowed in the integer portion of a number. This * override limits the integer digit count to 309. * * @see NumberFormat#setMinimumIntegerDigits * @stable ICU 2.0 */ public void setMinimumIntegerDigits(int newValue) { super.setMinimumIntegerDigits(newValue); }
@Override public void setMinimumIntegerDigits(int newValue) { fIcuNfmt.setMinimumIntegerDigits(newValue); }
/** * Sets the minimum number of digits allowed in the integer portion of a number. This * override limits the integer digit count to 309. * * @see NumberFormat#setMinimumIntegerDigits * @stable ICU 2.0 */ @Override public void setMinimumIntegerDigits(int newValue) { super.setMinimumIntegerDigits(Math.min(newValue, DOUBLE_INTEGER_DIGITS)); }
/** * Formats a number with the specified minimum and maximum number of digits. * @stable ICU 2.0 */ protected String zeroPaddingNumber(long value, int minDigits, int maxDigits) { numberFormat.setMinimumIntegerDigits(minDigits); numberFormat.setMaximumIntegerDigits(maxDigits); return numberFormat.format(value); }
/** * Internal high-speed method. Reuses a StringBuffer for results * instead of creating a String on the heap for each call. * @internal * @deprecated This API is ICU internal only. */ @Deprecated protected void zeroPaddingNumber(NumberFormat nf,StringBuffer buf, int value, int minDigits, int maxDigits) { // Note: Indian calendar uses negative value for a calendar // field. fastZeroPaddingNumber cannot handle negative numbers. // BTW, it looks like a design bug in the Indian calendar... if (useLocalZeroPaddingNumberFormat && value >= 0) { fastZeroPaddingNumber(buf, value, minDigits, maxDigits); } else { nf.setMinimumIntegerDigits(minDigits); nf.setMaximumIntegerDigits(maxDigits); nf.format(value, buf, new FieldPosition(-1)); } }
numberFormat.setMinimumIntegerDigits(Math.min(3, count)); numberFormat.setMaximumIntegerDigits(maxIntCount); if (count == 1) { numberFormat.format(value, buf, p); if (count > 3) { numberFormat.setMinimumIntegerDigits(count - 3); numberFormat.format(0L, buf, p);