public enum OverflowMode extends Enum<OverflowMode>
Enum Constant and Description |
---|
CHECKED
Operations causing an overflow throw an
ArithmeticException . |
UNCHECKED
Operations causing an overflow silently return the truncated result (the
low order bytes of the extended result); no exception is thrown.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isChecked()
Returns true if overflow leads to an
ArithmeticException |
static OverflowMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OverflowMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OverflowMode UNCHECKED
public static final OverflowMode CHECKED
ArithmeticException
.public static OverflowMode[] values()
for (OverflowMode c : OverflowMode.values()) System.out.println(c);
public static OverflowMode 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 final boolean isChecked()
ArithmeticException
this == CHECKED