public class LogFormat extends java.text.NumberFormat
Constructor and Description |
---|
LogFormat()
Creates a new instance using base 10.
|
LogFormat(double base,
java.lang.String baseLabel,
boolean showBase)
Creates a new instance.
|
LogFormat(double base,
java.lang.String baseLabel,
java.lang.String powerLabel,
boolean showBase)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this instance.
|
boolean |
equals(java.lang.Object obj)
Tests this formatter for equality with an arbitrary object.
|
java.lang.StringBuffer |
format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Returns a formatted representation of the specified number.
|
java.lang.StringBuffer |
format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats the specified number as a hexadecimal string.
|
java.text.NumberFormat |
getExponentFormat()
Returns the number format used for the exponent.
|
java.lang.Number |
parse(java.lang.String source,
java.text.ParsePosition parsePosition)
Parsing is not implemented, so this method always returns
null . |
void |
setExponentFormat(java.text.NumberFormat format)
Sets the number format used for the exponent.
|
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 LogFormat()
public LogFormat(double base, java.lang.String baseLabel, boolean showBase)
base
- the base.baseLabel
- the base label (null
not permitted).showBase
- a flag that controls whether or not the base value is
shown.public LogFormat(double base, java.lang.String baseLabel, java.lang.String powerLabel, boolean showBase)
base
- the base.baseLabel
- the base label (null
not permitted).powerLabel
- the power label (null
not permitted).showBase
- a flag that controls whether or not the base value is
shown.public java.text.NumberFormat getExponentFormat()
null
).public void setExponentFormat(java.text.NumberFormat format)
format
- the formatter (null
not permitted).public java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
number
- the number.toAppendTo
- the string buffer to append to.pos
- the position.public java.lang.StringBuffer format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.NumberFormat
number
- the number to format.toAppendTo
- the buffer to append to (ignored here).pos
- the field position (ignored here).public java.lang.Number parse(java.lang.String source, java.text.ParsePosition parsePosition)
null
.parse
in class java.text.NumberFormat
source
- ignored.parsePosition
- ignored.null
.public boolean equals(java.lang.Object obj)
equals
in class java.text.NumberFormat
obj
- the object (null
permitted).public java.lang.Object clone()
clone
in class java.text.NumberFormat