To create an IntegerWidth, use one of the factory methods.
NumberFormatter
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final IntegerWidth | |
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public IntegerWidth | Returns: An IntegerWidth for passing to the NumberFormatter integerWidth() setter.The maximum number of places before the decimal separator. maxInt == -1 means no
truncation. maxInt)Truncate numbers exceeding a certain number of numerals before the decimal separator. |
| public static IntegerWidth | Returns: An IntegerWidth for chaining or passing to the NumberFormatter integerWidth() setter.The minimum number of places before the decimal separator. minInt)Pad numbers at the beginning with zeros to guarantee a certain number of numerals before the decimal separator. |
| DEFAULT | back to summary |
|---|---|
| pack-priv static final IntegerWidth DEFAULT | |
| maxInt | back to summary |
|---|---|
| pack-priv final int maxInt | |
| minInt | back to summary |
|---|---|
| pack-priv final int minInt | |
| IntegerWidth | back to summary |
|---|---|
| private IntegerWidth(int minInt, int maxInt) | |
| truncateAt | back to summary |
|---|---|
| public IntegerWidth truncateAt(int maxInt) Truncate numbers exceeding a certain number of numerals before the decimal separator. For example, with maxInt=3, the number 1234 will get printed as "234".
| |
| zeroFillTo | back to summary |
|---|---|
| public static IntegerWidth zeroFillTo(int minInt) Pad numbers at the beginning with zeros to guarantee a certain number of numerals before the decimal separator. For example, with minInt=3, the number 55 will get printed as "055".
| |