| Modifier and Type | Class and Description |
|---|---|
| public static enum | NumberFormatter.
designates the format of exponent notation used by ScientificFormat |
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final MathContext | |
| private static final int | |
| private final NumberFormatter. | |
| public static final MathContext | |
| private static final int | |
| private final NumberFormatter. | |
| public static final MathContext | |
| private static final int | |
| private final NumberFormatter. | |
| private static final String | |
| private static final String | |
| private static final String | |
| public static final RoundingMode |
| Access | Constructor and Description |
|---|---|
| public |
| DBL_MATH_CONTEXT | back to summary |
|---|---|
| public static final MathContext DBL_MATH_CONTEXT | |
| DBL_SIG_DIGITS | back to summary |
|---|---|
| private static final int DBL_SIG_DIGITS | |
| dblFmt | back to summary |
|---|---|
| private final NumberFormatter. | |
| DEC_MATH_CONTEXT | back to summary |
|---|---|
| public static final MathContext DEC_MATH_CONTEXT | |
| DEC_SIG_DIGITS | back to summary |
|---|---|
| private static final int DEC_SIG_DIGITS | |
| decFmt | back to summary |
|---|---|
| private final NumberFormatter. | |
| FLT_MATH_CONTEXT | back to summary |
|---|---|
| public static final MathContext FLT_MATH_CONTEXT | |
| FLT_SIG_DIGITS | back to summary |
|---|---|
| private static final int FLT_SIG_DIGITS | |
| fltFmt | back to summary |
|---|---|
| private final NumberFormatter. | |
| NAN_STR | back to summary |
|---|---|
| private static final String NAN_STR | |
| NEG_INF_STR | back to summary |
|---|---|
| private static final String NEG_INF_STR | |
| POS_INF_STR | back to summary |
|---|---|
| private static final String POS_INF_STR | |
| ROUND_MODE | back to summary |
|---|---|
| public static final RoundingMode ROUND_MODE | |
| NumberFormatter | back to summary |
|---|---|
| public NumberFormatter(DecimalFormatSymbols syms) | |
| format | back to summary |
|---|---|
public String format(float f)
| |
| format | back to summary |
|---|---|
public String format(double d)
| |
| format | back to summary |
|---|---|
| public String format(BigDecimal bd) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final NumberFormatter. | EXP_E_MINUS
Scientific notation "E", "E-" (default java behavior) |
| public static final NumberFormatter. | EXP_e_MINUS
Scientific notation "e", "e-" |
| public static final NumberFormatter. | EXP_E_PLUS
Scientific notation "E+", "E-" |
| public static final NumberFormatter. | EXP_e_PLUS
Scientific notation "e+", "e-" |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| private static void | |
| public static NumberFormatter. | |
| public static NumberFormatter. |
| EXP_E_MINUS | back to summary |
|---|---|
| public static final NumberFormatter. Scientific notation "E", "E-" (default java behavior) | |
| EXP_e_MINUS | back to summary |
|---|---|
| public static final NumberFormatter. Scientific notation "e", "e-" | |
| EXP_E_PLUS | back to summary |
|---|---|
| public static final NumberFormatter. Scientific notation "E+", "E-" | |
| EXP_e_PLUS | back to summary |
|---|---|
| public static final NumberFormatter. Scientific notation "e+", "e-" | |
| NotationType | back to summary |
|---|---|
| private NotationType() | |
| format | back to summary |
|---|---|
| protected abstract void format(StringBuffer sb, int idx) | |
| maybeInsertExpPlus | back to summary |
|---|---|
| private static void maybeInsertExpPlus(StringBuffer sb, int eIdx) | |
| valueOf | back to summary |
|---|---|
| public static NumberFormatter. | |
| values | back to summary |
|---|---|
| public static NumberFormatter. | |
| Modifier and Type | Field and Description |
|---|---|
| private final NumberFormat | |
| private static final long | |
| private final NumberFormatter. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public StringBuffer | format(Object number, StringBuffer toAppendTo, FieldPosition pos)
Overrides java. Formats a number and appends the resulting text to the given string buffer. |
| public StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract java. Specialization of format. |
| public StringBuffer | format(long number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract java. Specialization of format. |
| public int | getMaximumFractionDigits()
Overrides java. Returns the maximum number of digits allowed in the fraction portion of a number during formatting. |
| public int | getMinimumFractionDigits()
Overrides java. Returns the minimum number of digits allowed in the fraction portion of a number during formatting. |
| public Number | parse(String source, ParsePosition parsePosition)
Implements abstract java. Parses text from the beginning of the given string to produce a |
| df | back to summary |
|---|---|
| private final NumberFormat df | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| type | back to summary |
|---|---|
| private final NumberFormatter. | |
| ScientificFormat | back to summary |
|---|---|
| public ScientificFormat(NumberFormat df) | |
| ScientificFormat | back to summary |
|---|---|
| public ScientificFormat(NumberFormat df, NumberFormatter. | |
| format | back to summary |
|---|---|
| public StringBuffer format(Object number, StringBuffer toAppendTo, FieldPosition pos) Overrides java. Doc from java. Formats a number and appends the resulting text to the given string
buffer.
The number can be of any subclass of
This implementation extracts the number's value using
| |
| format | back to summary |
|---|---|
| public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract java. Doc from java. Specialization of format.
| |
| format | back to summary |
|---|---|
| public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract java. Doc from java. Specialization of format.
| |
| getMaximumFractionDigits | back to summary |
|---|---|
| public int getMaximumFractionDigits() Overrides java. Doc from java. Returns the maximum number of digits allowed in the fraction portion of a number during formatting.
| |
| getMinimumFractionDigits | back to summary |
|---|---|
| public int getMinimumFractionDigits() Overrides java. Doc from java. Returns the minimum number of digits allowed in the fraction portion of a number during formatting.
| |
| parse | back to summary |
|---|---|
| public Number parse(String source, ParsePosition parsePosition) Implements abstract java. Doc from java. Parses text from the beginning of the given string to produce a
This method attempts to parse text starting at the index given by the
This method will return a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final DecimalFormat | |
| private final NumberFormatter. | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static NumberFormatter. | |
| public String |
| df | back to summary |
|---|---|
| private final DecimalFormat df | |
| dfS | back to summary |
|---|---|
| private final NumberFormatter. | |
| prec | back to summary |
|---|---|
| private final int prec | |
| TypeFormatter | back to summary |
|---|---|
| private TypeFormatter(int prec, DecimalFormatSymbols syms) | |
| createScientificFormat | back to summary |
|---|---|
| private static NumberFormatter. | |
| format | back to summary |
|---|---|
| public String format(BigDecimal bd) | |