public enum RoundingMode extends Enum<RoundingMode>
| Enum Constant and Description |
|---|
CEILING |
DOWN |
FLOOR |
HALF_DOWN |
HALF_EVEN |
HALF_UP |
UNNECESSARY |
UP |
| Modifier and Type | Method and Description |
|---|---|
static RoundingMode |
valueOf(int rm)
Returns the RoundingMode object corresponding to the legacy rounding modes
in BigDecimal.
|
static RoundingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RoundingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoundingMode UP
public static final RoundingMode DOWN
public static final RoundingMode CEILING
public static final RoundingMode FLOOR
public static final RoundingMode HALF_UP
public static final RoundingMode HALF_DOWN
public static final RoundingMode HALF_EVEN
public static final RoundingMode UNNECESSARY
public static RoundingMode[] values()
for (RoundingMode c : RoundingMode.values()) System.out.println(c);
public static RoundingMode 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 RoundingMode valueOf(int rm)
rm - the legacy rounding mode