public static enum DoubleUtils.RoundingScheme extends java.lang.Enum<DoubleUtils.RoundingScheme>
| Enum Constant and Description |
|---|
DEFAULT
This rounding scheme is the same as in
Math.round(float). |
DOWN
Always round down.
|
UP
Always round up.
|
| Modifier and Type | Method and Description |
|---|---|
static DoubleUtils.RoundingScheme |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DoubleUtils.RoundingScheme[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DoubleUtils.RoundingScheme DEFAULT
Math.round(float). That is,
returning the closest long to the input.
The input is rounded to an integer by adding 1/2, taking the floor,
and casting it to long.public static final DoubleUtils.RoundingScheme UP
public static final DoubleUtils.RoundingScheme DOWN
public static DoubleUtils.RoundingScheme[] values()
for (DoubleUtils.RoundingScheme c : DoubleUtils.RoundingScheme.values()) System.out.println(c);
public static DoubleUtils.RoundingScheme valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null