|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjp.ne.dti.lares.foozy.ptlog.format.DefaultShortFormatter
Default implementation.
This uses Integer#toString(int value, int radix),
which is used invoked from Short#toString in fact,
to format specified value.
| Field Summary | |
static DefaultShortFormatter |
S_DEC
For convenience to format decimal radix as signed short. |
static DefaultShortFormatter |
S_HEX
For convenience to format hexadecimal radix as signed short. |
static DefaultShortFormatter |
S_OCT
For convenience to format in octal radix as signed short. |
static DefaultShortFormatter |
U_DEC
For convenience to format decimal radix as unsigned short. |
static DefaultShortFormatter |
U_HEX
For convenience to format hexadecimal radix as unsigned short. |
static DefaultShortFormatter |
U_OCT
For convenience to format in octal radix as unsigned short. |
| Constructor Summary | |
DefaultShortFormatter(int radix,
boolean useSign)
Constructor. |
|
| Method Summary | |
java.lang.String |
format(short value)
Format specified value. |
java.lang.String |
format(java.lang.Short 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 DefaultShortFormatter S_OCT
This returns "-1" for 0xFFFF.
public static final DefaultShortFormatter U_OCT
This returns "1777777" for 0xFFFF.
public static final DefaultShortFormatter S_DEC
This returns "-1" for 0xFFFF.
public static final DefaultShortFormatter U_DEC
This returns "65535" for 0xFFFF.
public static final DefaultShortFormatter S_HEX
This returns "-1" for 0xFFFF.
public static final DefaultShortFormatter U_HEX
This returns "ffff" for 0xFFFF.
| Constructor Detail |
public DefaultShortFormatter(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(Short) of "this".
This adaptation is done even if
you override format(Short) in derived classes.
DefaultUniversalFormatter.addObjectFormatter(jp.ne.dti.lares.foozy.ptlog.format.ObjectFormatter)public java.lang.String format(short value)
ShortFormatter
format in interface ShortFormatterpublic java.lang.String format(java.lang.Short value)
ShortFormatter
format in interface ShortFormatter
|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||