|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||
java.lang.Objectjava.lang.Enum<DoubleUtils.RoundingScheme>
com.numericalmethod.suanshu.number.DoubleUtils.RoundingScheme
public static enum DoubleUtils.RoundingScheme
the schemes available to round a number.
| Enum Constant Summary | |
|---|---|
DEFAULT
Use the scheme as in Math.round(float). |
|
DOWN
Always round down. |
|
UP
Always round up. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final DoubleUtils.RoundingScheme DEFAULT
Math.round(float). That is,
returning the closest long to the argument.
The result is rounded to an integer by adding 1/2, taking the floor of the result,
and casting the result to type long.
public static final DoubleUtils.RoundingScheme UP
public static final DoubleUtils.RoundingScheme DOWN
| Method Detail |
|---|
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 name
java.lang.NullPointerException - if the argument is null
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||