public class SignificantFigureFormat extends DecimalFormat
NumberFormat.Field
FRACTION_FIELD, INTEGER_FIELD
Constructor and Description |
---|
SignificantFigureFormat(int significantFigures)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
StringBuffer |
format(double number,
StringBuffer buffer,
FieldPosition position)
Almost certainly doesn't set position correctly.
|
StringBuffer |
format(long number,
StringBuffer buffer,
FieldPosition position)
Almost certainly doesn't set position correctly.
|
int |
hashCode() |
applyLocalizedPattern, applyPattern, clone, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, getRoundingMode, isDecimalSeparatorAlwaysShown, isParseBigDecimal, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setParseBigDecimal, setPositivePrefix, setPositiveSuffix, setRoundingMode, toLocalizedPattern, toPattern
format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnly
format, parseObject
public SignificantFigureFormat(int significantFigures)
significantFigures
- Number of significant figures.public StringBuffer format(double number, StringBuffer buffer, FieldPosition position)
format
in class DecimalFormat
number
- Number to format.buffer
- Buffer to append result to.position
- Field position.StringBuffer
valuepublic StringBuffer format(long number, StringBuffer buffer, FieldPosition position)
format
in class DecimalFormat
number
- Number to format.buffer
- Buffer to append result to.position
- Field position.StringBuffer
valuepublic boolean equals(Object o)
equals
in class DecimalFormat
public int hashCode()
hashCode
in class DecimalFormat
Copyright © 2000-2014. All Rights Reserved.