public class BaseFormat
extends java.text.NumberFormat
Constructor and Description |
---|
BaseFormat(int base)
Create a new base format object
|
BaseFormat(int base,
java.lang.String prefix)
Create a new base format object
|
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
format(double val,
java.lang.StringBuffer sb,
java.text.FieldPosition fp)
Format a double value in specific base.
|
java.lang.StringBuffer |
format(long val,
java.lang.StringBuffer sb,
java.text.FieldPosition fp)
Format a double value in specific base.
|
java.lang.Number |
parse(java.lang.String arg0,
java.text.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
public BaseFormat(int base)
base
- the base of number to usejava.lang.IllegalArgumentException
- if base is < 2 or > 36public BaseFormat(int base, java.lang.String prefix)
base
- the base of number to useprefix
- prefix to appear before numberjava.lang.IllegalArgumentException
- if base is < 2 or > 36public java.lang.StringBuffer format(double val, java.lang.StringBuffer sb, java.text.FieldPosition fp)
format
in class java.text.NumberFormat
val
- the number to formatsb
- the buffer to append tofp
- not usedpublic java.lang.StringBuffer format(long val, java.lang.StringBuffer sb, java.text.FieldPosition fp)
format
in class java.text.NumberFormat
val
- the number to formatsb
- the buffer to append tofp
- not usedpublic java.lang.Number parse(java.lang.String arg0, java.text.ParsePosition arg1)
parse
in class java.text.NumberFormat
http://www.singularsys.com/jep Copyright © 2007 Singular Systems