public class IntegerFormat
extends java.text.NumberFormat
| Modifier and Type | Field and Description |
|---|---|
static IntegerFormat |
INTEGER_FORMAT_DIGITS_2
2 digit integer formatter
|
static IntegerFormat |
INTEGER_FORMAT_DIGITS_3
3 digit integer formatter
|
| Constructor and Description |
|---|
IntegerFormat()
Constructor which sets the fill character to the default of 1 space, i.e.
|
IntegerFormat(char filler)
Constructor that sets the filler to the supplied character
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.StringBuffer |
format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Not supported for formatting double values
|
java.lang.StringBuffer |
format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats a long value to include the filler character if needed
|
char |
getFillerChar()
Get the value of fillerChar
|
java.lang.Number |
parse(java.lang.String source,
java.text.ParsePosition parsePosition)
Parses an integer based on the source string.
|
void |
setCurrency(java.util.Currency currency)
Not supported
|
void |
setFillerChar(char fillerChar)
Set the value of fillerChar
|
void |
setMaximumFractionDigits(int newValue)
Not supported
|
void |
setMinimumFractionDigits(int newValue)
Not supported
|
clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setMaximumIntegerDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingModepublic static final IntegerFormat INTEGER_FORMAT_DIGITS_3
public static final IntegerFormat INTEGER_FORMAT_DIGITS_2
public IntegerFormat()
public IntegerFormat(char filler)
filler - public char getFillerChar()
public void setFillerChar(char fillerChar)
fillerChar - new value of fillerCharpublic java.lang.StringBuffer format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
format in class java.text.NumberFormatnumber - toAppendTo - pos - public java.lang.StringBuffer format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
format in class java.text.NumberFormatnumber - toAppendTo - pos - public java.lang.Number parse(java.lang.String source,
java.text.ParsePosition parsePosition)
parse in class java.text.NumberFormatsource - parsePosition - java.lang.NumberFormatExceptionpublic void setCurrency(java.util.Currency currency)
setCurrency in class java.text.NumberFormatcurrency - public void setMaximumFractionDigits(int newValue)
setMaximumFractionDigits in class java.text.NumberFormatnewValue - public void setMinimumFractionDigits(int newValue)
setMinimumFractionDigits in class java.text.NumberFormatnewValue -