mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Adds code to get the Scala REPL working
This commit is contained in:
36
classpath/java/math/RoundingMode.java
Normal file
36
classpath/java/math/RoundingMode.java
Normal file
@ -0,0 +1,36 @@
|
||||
/* Copyright (c) 2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
that the above copyright notice and this permission notice appear
|
||||
in all copies.
|
||||
|
||||
There is NO WARRANTY for this software. See license.txt for
|
||||
details. */
|
||||
|
||||
package java.math;
|
||||
|
||||
public enum RoundingMode {
|
||||
|
||||
UP (0),
|
||||
DOWN (1),
|
||||
CEILING (2),
|
||||
FLOOR (3),
|
||||
HALF_UP (4),
|
||||
HALF_DOWN (5),
|
||||
HALF_EVEN (6),
|
||||
UNNECESSARY(7);
|
||||
|
||||
RoundingMode(int rm) {
|
||||
roundingMode = rm;
|
||||
}
|
||||
|
||||
private final int roundingMode;
|
||||
|
||||
public static RoundingMode valueOf(int roundingMode) {
|
||||
final RoundingMode[] values = values();
|
||||
if (roundingMode < 0 || roundingMode >= values.length)
|
||||
throw new IllegalArgumentException();
|
||||
return values[roundingMode];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user