public class HexNumberFormat extends NumberFormat
NumberFormat.Field| Modifier and Type | Field and Description |
|---|---|
static int |
BYTE
Number of hexadecimal digits for a byte.
|
static int |
DWORD
Number of hexadecimal digits for a double word.
|
static int |
QWORD
Number of hexadecimal digits for a quad word.
|
static int |
WORD
Number of hexadecimal digits for a word.
|
FRACTION_FIELD, INTEGER_FIELD| Constructor and Description |
|---|
HexNumberFormat()
Creates a new instance with 8 digits.
|
HexNumberFormat(int digits)
Creates a new instance with the specified number of digits.
|
| Modifier and Type | Method and Description |
|---|---|
StringBuffer |
format(double number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats the specified number as a hexadecimal string.
|
StringBuffer |
format(long number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats the specified number as a hexadecimal string.
|
int |
getNumberOfDigits()
Returns the number of digits.
|
Number |
parse(String source,
ParsePosition parsePosition)
Parsing is not implemented, so this method always returns
null. |
void |
setNumberOfDigits(int digits)
Sets the number of digits.
|
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, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingModeformat, formatToCharacterIterator, parseObjectpublic static final int BYTE
public static final int WORD
public static final int DWORD
public static final int QWORD
public HexNumberFormat()
public HexNumberFormat(int digits)
digits - the digits.public final int getNumberOfDigits()
public void setNumberOfDigits(int digits)
digits - the number of digits.public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)
format in class NumberFormatnumber - the number to format.toAppendTo - the buffer to append to (ignored here).pos - the field position (ignored here).public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos)
format in class NumberFormatnumber - the number to format.toAppendTo - the buffer to append to (ignored here).pos - the field position (ignored here).public Number parse(String source, ParsePosition parsePosition)
null.parse in class NumberFormatsource - ignored.parsePosition - ignored.null.Copyright © 2001–2014 JFree.org. All rights reserved.