|
PTLog API - 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jp.ne.dti.lares.foozy.ptlog.format.DefaultIntFormatter
Default implementation.
This uses Long#toString(long value, int radix)
to format specified value.
Field Summary | |
static DefaultIntFormatter |
S_DEC
For convenience to format decimal radix as signed int. |
static DefaultIntFormatter |
S_HEX
For convenience to format hexadecimal radix as signed int. |
static DefaultIntFormatter |
S_OCT
For convenience to format in octal radix as signed int. |
static DefaultIntFormatter |
U_DEC
For convenience to format decimal radix as unsigned int. |
static DefaultIntFormatter |
U_HEX
For convenience to format hexadecimal radix as unsigned int. |
static DefaultIntFormatter |
U_OCT
For convenience to format in octal radix as unsigned int. |
Constructor Summary | |
DefaultIntFormatter(int radix,
boolean useSign)
Constructor. |
Method Summary | |
java.lang.String |
format(int value)
Format specified value. |
java.lang.String |
format(java.lang.Integer value)
Format specified value. |
ObjectFormatter |
forObject()
Get object which adapts "this" to ObjectFormatter .
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final DefaultIntFormatter S_OCT
This returns "-1" for 0xFFFFFFFF.
public static final DefaultIntFormatter U_OCT
This returns "37777777777" for 0xFFFFFFFF.
public static final DefaultIntFormatter S_DEC
This returns "-1" for 0xFFFFFFFF.
public static final DefaultIntFormatter U_DEC
This returns "4294967295" for 0xFFFFFFFF.
public static final DefaultIntFormatter S_HEX
This returns "-1" for 0xFFFFFFFF.
public static final DefaultIntFormatter U_HEX
This returns "ffffffff" for 0xFFFFFFFF.
Constructor Detail |
public DefaultIntFormatter(int radix, boolean useSign)
radix
- to format specified byte value.useSign
- whether sign('-') is used to represent value or not.Method Detail |
public final ObjectFormatter forObject()
ObjectFormatter
.
This is useful to get ObjectFormatter
which formats value in as same manner as
format(Integer)
of "this".
This adaptation is done even if
you override format(Integer)
in derived classes.
DefaultUniversalFormatter.addObjectFormatter(jp.ne.dti.lares.foozy.ptlog.format.ObjectFormatter)
public java.lang.String format(int value)
IntFormatter
format
in interface IntFormatter
public java.lang.String format(java.lang.Integer value)
IntFormatter
format
in interface IntFormatter
|
PTLog API - 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |