public class BaseFormat extends NumberFormat
NumberFormat.Field
FRACTION_FIELD, INTEGER_FIELD
Constructor and Description |
---|
BaseFormat(int base)
Create a new base format object
|
BaseFormat(int base,
String prefix)
Create a new base format object
|
Modifier and Type | Method and Description |
---|---|
StringBuffer |
format(double val,
StringBuffer sb,
FieldPosition fp)
Format a double value in specific base.
|
StringBuffer |
format(long val,
StringBuffer sb,
FieldPosition fp)
Format a double value in specific base.
|
Number |
parse(String arg0,
ParsePosition arg1)
Not implemented
|
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, setRoundingMode
format, formatToCharacterIterator, parseObject
public BaseFormat(int base)
base
- the base of number to useIllegalArgumentException
- if base is < 2 or > 36public BaseFormat(int base, String prefix)
base
- the base of number to useprefix
- prefix to appear before numberIllegalArgumentException
- if base is < 2 or > 36public StringBuffer format(double val, StringBuffer sb, FieldPosition fp)
format
in class NumberFormat
val
- the number to formatsb
- the buffer to append tofp
- not usedpublic StringBuffer format(long val, StringBuffer sb, FieldPosition fp)
format
in class NumberFormat
val
- the number to formatsb
- the buffer to append tofp
- not usedpublic Number parse(String arg0, ParsePosition arg1)
parse
in class NumberFormat
Jas4pp 1.5 © Java Analysis Studio for Particle Physics