|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.Format gnu.text.ReportFormat gnu.text.IntegerFormat
public class IntegerFormat
Handle formatting of integers. Used to implement the Common Lisp ~D (Decimal), ~X (Hexadecimal), ~O (Octal), ~B (Binary), and ~R (Radix) Common Lisp formats operators.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.Format |
---|
java.text.Format.Field |
Field Summary | |
---|---|
int |
base
|
int |
commaChar
|
int |
commaInterval
|
int |
flags
|
static int |
MIN_DIGITS
The minWidth is minimum number of digits, not minimum total width. |
int |
minWidth
Minimal width of the result, includiing sign, commas, etc. |
static int |
PAD_RIGHT
|
int |
padChar
The padding characters, by default ' '. |
static int |
SHOW_BASE
Add "0x" (hex) or "0" (octal) prefix. |
static int |
SHOW_GROUPS
Do groups (for example thousands, using commas). |
static int |
SHOW_PLUS
If value is non-negative, emit a '+'. |
static int |
SHOW_SPACE
If value is non-negative, emit an initial ' '. |
static int |
UPPERCASE
|
Fields inherited from class gnu.text.ReportFormat |
---|
PARAM_FROM_COUNT, PARAM_FROM_LIST, PARAM_UNSPECIFIED |
Constructor Summary | |
---|---|
IntegerFormat()
|
Method Summary | |
---|---|
java.lang.String |
convertToIntegerString(java.lang.Object x,
int radix)
|
int |
format(java.lang.Object[] args,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
Format an array of arguments, and write out the result. |
int |
format(java.lang.Object arg,
int start,
java.io.Writer dst,
java.text.FieldPosition fpos)
|
Methods inherited from class gnu.text.ReportFormat |
---|
format, format, format, format, getParam, getParam, getParam, nextArg, parseObject, print, result, resultCode |
Methods inherited from class java.text.Format |
---|
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int base
public int minWidth
public int padChar
public int commaChar
public int commaInterval
public int flags
public static final int SHOW_GROUPS
public static final int SHOW_PLUS
public static final int SHOW_SPACE
public static final int SHOW_BASE
public static final int PAD_RIGHT
public static final int UPPERCASE
public static final int MIN_DIGITS
Constructor Detail |
---|
public IntegerFormat()
Method Detail |
---|
public int format(java.lang.Object[] args, int start, java.io.Writer dst, java.text.FieldPosition fpos) throws java.io.IOException
ReportFormat
format
in class ReportFormat
args
- the objects to be formattedstart
- the index (in args) of the argument to start withdst
- where to write the result
java.io.IOException
public int format(java.lang.Object arg, int start, java.io.Writer dst, java.text.FieldPosition fpos) throws java.io.IOException
format
in class ReportFormat
java.io.IOException
public java.lang.String convertToIntegerString(java.lang.Object x, int radix)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |