org.lsmp.djep.xjep
Class BaseFormat
java.lang.Object
java.text.Format
java.text.NumberFormat
org.lsmp.djep.xjep.BaseFormat
- All Implemented Interfaces:
- Serializable, Cloneable
public class BaseFormat
- extends NumberFormat
A Number format object which prints results in a specified base.
TODO Do something with the FieldPosition arguments.
- Author:
- Rich Morris
Created on 02-May-2005
- See Also:
- Serialized Form
|
Constructor Summary |
BaseFormat(int base)
Create a new base format object |
BaseFormat(int base,
String prefix)
Create a new base format object |
| Methods inherited from class java.text.NumberFormat |
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 |
BaseFormat
public BaseFormat(int base)
- Create a new base format object
- Parameters:
base - the base of number to use
- Throws:
IllegalArgumentException - if base is < 2 or > 36
BaseFormat
public BaseFormat(int base,
String prefix)
- Create a new base format object
- Parameters:
base - the base of number to useprefix - prefix to appear before number
- Throws:
IllegalArgumentException - if base is < 2 or > 36
format
public StringBuffer format(double val,
StringBuffer sb,
FieldPosition fp)
- Format a double value in specific base.
- Specified by:
format in class NumberFormat
- Parameters:
val - the number to formatsb - the buffer to append tofp - not used
- Returns:
- the string buffer
format
public StringBuffer format(long val,
StringBuffer sb,
FieldPosition fp)
- Format a double value in specific base.
- Specified by:
format in class NumberFormat
- Parameters:
val - the number to formatsb - the buffer to append tofp - not used
- Returns:
- the string buffer
parse
public Number parse(String arg0,
ParsePosition arg1)
- Not implemented
- Specified by:
parse in class NumberFormat
Copyright © 2014. All rights reserved.