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.NumberFormatterpublic IntegerWidth truncateAt(int maxInt)
maxInt - The maximum number of places before the decimal separator.NumberFormatterCopyright ? 2016 Unicode, Inc. and others.