public enum NumericPresentation extends Enum<NumericPresentation>
| Enum Constant and Description |
|---|
MONEY
Default monetary representation.
|
MONEY_FULL
Display as amount with currency symbol, thousands separators, decimal point and complete fraction (always)
|
MONEY_FULL_TRUNC
Display as full, but if the fraction (cents) is all zeroes remove them
|
MONEY_NO_SYMBOL
Display as a number having thousands separator and fraction but without currency symbol
|
MONEY_NUMERIC
Just the amount, including faction, without any unnecessary adornments (similar to NUMBER_SCALED)
|
NUMBER
Just a run-of-the-mill number, containing only a fraction separator when needed
|
NUMBER_FULL
Fully embellished number, with thousand separators and such
|
NUMBER_SCALED
Amount, including fraction and specified number of decimals places (by scale), without any thousand separators
|
NUMBER_SCIENTIFIC
Presented in full precision, moving to scientific (x.xxEyy) mode when needed
|
UNKNOWN
No explicit presentation set.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isMonetary(NumericPresentation np) |
static boolean |
isStripTrailingZeros(NumericPresentation np)
Returns if specified numeric presentation should be rendered without trailing zeros at the end of decimal fraction part.
|
static NumericPresentation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NumericPresentation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NumericPresentation UNKNOWN
public static final NumericPresentation NUMBER
public static final NumericPresentation NUMBER_SCIENTIFIC
public static final NumericPresentation NUMBER_SCALED
public static final NumericPresentation NUMBER_FULL
public static final NumericPresentation MONEY
public static final NumericPresentation MONEY_FULL
public static final NumericPresentation MONEY_FULL_TRUNC
public static final NumericPresentation MONEY_NO_SYMBOL
public static final NumericPresentation MONEY_NUMERIC
public static NumericPresentation[] values()
for (NumericPresentation c : NumericPresentation.values()) System.out.println(c);
public static NumericPresentation valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static boolean isMonetary(NumericPresentation np)
public static boolean isStripTrailingZeros(NumericPresentation np)
np - Copyright © 2017 etc.to. All rights reserved.