public class IntegerWidth
extends java.lang.Object
To create an IntegerWidth, use one of the factory methods.
NumberFormatter
Modifier and Type | Method | Description |
---|---|---|
IntegerWidth |
truncateAt(int maxInt) |
Truncate numbers exceeding a certain number of numerals before the decimal separator.
|
static IntegerWidth |
zeroFillTo(int minInt) |
Pad numbers at the beginning with zeros to guarantee a certain number of numerals before the decimal separator.
|
public static IntegerWidth zeroFillTo(int minInt)
For example, with minInt=3, the number 55 will get printed as "055".
minInt
- The minimum number of places before the decimal separator.NumberFormatter
public IntegerWidth truncateAt(int maxInt)
maxInt
- The maximum number of places before the decimal separator.NumberFormatter
Copyright ? 2016 Unicode, Inc. and others.