352
352
* digits as well as all Unicode decimal digits, as defined by
353
353
* {@link Character#digit Character.digit}, are recognized.
354
354
*
355
+ * <h3 id="digit_limits"> Integer and Fraction Digit Limits </h3>
356
+ *
357
+ * @implSpec
358
+ * When formatting a {@code Number} other than {@code BigInteger} and
359
+ * {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits,
360
+ * and {@code 340} as the upper limit for fraction digits. This occurs, even if
361
+ * one of the {@code DecimalFormat} getter methods, for example, {@link #getMinimumFractionDigits()}
362
+ * returns a numerically greater value.
363
+ *
355
364
* <h4>Special Values</h4>
356
365
*
357
366
* <p>Not a Number({@code NaN}) is formatted as a string, which typically has a
@@ -3718,11 +3727,9 @@ else if (ch == percent) {
3718
3727
3719
3728
/**
3720
3729
* Sets the maximum number of digits allowed in the integer portion of a
3721
- * number.
3722
- * For formatting numbers other than {@code BigInteger} and
3723
- * {@code BigDecimal} objects, the lower of {@code newValue} and
3724
- * 309 is used. Negative input values are replaced with 0.
3730
+ * number. Negative input values are replaced with 0.
3725
3731
* @see NumberFormat#setMaximumIntegerDigits
3732
+ * @see ##digit_limits Integer and Fraction Digit Limits
3726
3733
*/
3727
3734
@ Override
3728
3735
public void setMaximumIntegerDigits (int newValue ) {
@@ -3737,11 +3744,9 @@ public void setMaximumIntegerDigits(int newValue) {
3737
3744
3738
3745
/**
3739
3746
* Sets the minimum number of digits allowed in the integer portion of a
3740
- * number.
3741
- * For formatting numbers other than {@code BigInteger} and
3742
- * {@code BigDecimal} objects, the lower of {@code newValue} and
3743
- * 309 is used. Negative input values are replaced with 0.
3747
+ * number. Negative input values are replaced with 0.
3744
3748
* @see NumberFormat#setMinimumIntegerDigits
3749
+ * @see ##digit_limits Integer and Fraction Digit Limits
3745
3750
*/
3746
3751
@ Override
3747
3752
public void setMinimumIntegerDigits (int newValue ) {
@@ -3756,11 +3761,9 @@ public void setMinimumIntegerDigits(int newValue) {
3756
3761
3757
3762
/**
3758
3763
* Sets the maximum number of digits allowed in the fraction portion of a
3759
- * number.
3760
- * For formatting numbers other than {@code BigInteger} and
3761
- * {@code BigDecimal} objects, the lower of {@code newValue} and
3762
- * 340 is used. Negative input values are replaced with 0.
3764
+ * number. Negative input values are replaced with 0.
3763
3765
* @see NumberFormat#setMaximumFractionDigits
3766
+ * @see ##digit_limits Integer and Fraction Digit Limits
3764
3767
*/
3765
3768
@ Override
3766
3769
public void setMaximumFractionDigits (int newValue ) {
@@ -3775,11 +3778,9 @@ public void setMaximumFractionDigits(int newValue) {
3775
3778
3776
3779
/**
3777
3780
* Sets the minimum number of digits allowed in the fraction portion of a
3778
- * number.
3779
- * For formatting numbers other than {@code BigInteger} and
3780
- * {@code BigDecimal} objects, the lower of {@code newValue} and
3781
- * 340 is used. Negative input values are replaced with 0.
3781
+ * number. Negative input values are replaced with 0.
3782
3782
* @see NumberFormat#setMinimumFractionDigits
3783
+ * @see ##digit_limits Integer and Fraction Digit Limits
3783
3784
*/
3784
3785
@ Override
3785
3786
public void setMinimumFractionDigits (int newValue ) {
@@ -3794,11 +3795,11 @@ public void setMinimumFractionDigits(int newValue) {
3794
3795
3795
3796
/**
3796
3797
* Gets the maximum number of digits allowed in the integer portion of a
3797
- * number.
3798
- * For formatting numbers other than {@code BigInteger} and
3799
- * {@code BigDecimal} objects, the lower of the return value and
3800
- * 309 is used.
3798
+ * number. The maximum number of integer digits can be set by either {@link #setMaximumIntegerDigits(int)}
3799
+ * or {@link #applyPattern(String)}. See the {@link ##patterns Pattern Section} for
3800
+ * comprehensive rules regarding maximum integer digits in patterns.
3801
3801
* @see #setMaximumIntegerDigits
3802
+ * @see ##digit_limits Integer and Fraction Digit Limits
3802
3803
*/
3803
3804
@ Override
3804
3805
public int getMaximumIntegerDigits () {
@@ -3808,10 +3809,8 @@ public int getMaximumIntegerDigits() {
3808
3809
/**
3809
3810
* Gets the minimum number of digits allowed in the integer portion of a
3810
3811
* number.
3811
- * For formatting numbers other than {@code BigInteger} and
3812
- * {@code BigDecimal} objects, the lower of the return value and
3813
- * 309 is used.
3814
3812
* @see #setMinimumIntegerDigits
3813
+ * @see ##digit_limits Integer and Fraction Digit Limits
3815
3814
*/
3816
3815
@ Override
3817
3816
public int getMinimumIntegerDigits () {
@@ -3821,10 +3820,8 @@ public int getMinimumIntegerDigits() {
3821
3820
/**
3822
3821
* Gets the maximum number of digits allowed in the fraction portion of a
3823
3822
* number.
3824
- * For formatting numbers other than {@code BigInteger} and
3825
- * {@code BigDecimal} objects, the lower of the return value and
3826
- * 340 is used.
3827
3823
* @see #setMaximumFractionDigits
3824
+ * @see ##digit_limits Integer and Fraction Digit Limits
3828
3825
*/
3829
3826
@ Override
3830
3827
public int getMaximumFractionDigits () {
@@ -3834,10 +3831,8 @@ public int getMaximumFractionDigits() {
3834
3831
/**
3835
3832
* Gets the minimum number of digits allowed in the fraction portion of a
3836
3833
* number.
3837
- * For formatting numbers other than {@code BigInteger} and
3838
- * {@code BigDecimal} objects, the lower of the return value and
3839
- * 340 is used.
3840
3834
* @see #setMinimumFractionDigits
3835
+ * @see ##digit_limits Integer and Fraction Digit Limits
3841
3836
*/
3842
3837
@ Override
3843
3838
public int getMinimumFractionDigits () {
0 commit comments