public class OverFlowUtil extends Object
Primitives |
|---|
| Byte |
| Short |
| Int |
| Long |
| Float |
| Double |
Immutables |
|---|
| BigInteger |
| BigDecimal |
| Constructor and Description |
|---|
OverFlowUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
byteOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to a byte.
|
static boolean |
byteOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to a byte.
|
static boolean |
byteOverflow(Double value)
Checks for overflow when converting a double to a byte.
|
static boolean |
byteOverflow(Float value)
Checks for overflow when converting a float to a byte.
|
static boolean |
byteOverflow(Integer value)
Checks for overflow when converting an integer to a byte.
|
static boolean |
byteOverflow(Long value)
Checks for overflow when converting a long to a byte.
|
static boolean |
byteOverflow(Short value)
Checks for overflow when converting a short to a byte.
|
static boolean |
doubleOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to an double.
|
static boolean |
doubleOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to an double.
|
static boolean |
floatOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to an float.
|
static boolean |
floatOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to an float.
|
static boolean |
floatOverflow(Double value)
Checks for overflow when converting a double to an float.
|
static boolean |
intOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to an integer.
|
static boolean |
intOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to an integer.
|
static boolean |
intOverflow(Double value)
Checks for overflow when converting a double to an integer.
|
static boolean |
intOverflow(Float value)
Checks for overflow when converting a float to an integer.
|
static boolean |
intOverflow(Long value)
Checks for overflow when converting a long to an integer.
|
static boolean |
longOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to an long.
|
static boolean |
longOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to an long.
|
static boolean |
longOverflow(Double value)
Checks for overflow when converting a double to an long.
|
static boolean |
longOverflow(Float value)
Checks for overflow when converting a float to an long.
|
static void |
overflowError(Number val)
Throws an arithmetic exception when overflow occurs.
|
static boolean |
shortOverflow(BigDecimal value)
Checks for overflow when converting a BigDecimal to a short.
|
static boolean |
shortOverflow(BigInteger value)
Checks for overflow when converting a BigInteger to a short.
|
static boolean |
shortOverflow(Double value)
Checks for overflow when converting a double to a short.
|
static boolean |
shortOverflow(Float value)
Checks for overflow when converting a float to a short.
|
static boolean |
shortOverflow(Integer value)
Checks for overflow when converting an integer to a short.
|
static boolean |
shortOverflow(Long value)
Checks for overflow when converting a long to a short.
|
static boolean |
shortOverflow(Short value)
Checks for overflow when converting a short to a short.
|
public static boolean byteOverflow(Double value)
Double - the input valuepublic static boolean byteOverflow(Float value)
Float - the input valuepublic static boolean byteOverflow(Long value)
Long - the input valuepublic static boolean byteOverflow(Integer value)
Integer - the input valuepublic static boolean byteOverflow(Short value)
Short - the input valuepublic static boolean byteOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean byteOverflow(BigInteger value)
BigInteger - the input valuepublic static boolean shortOverflow(Double value)
Double - the input valuepublic static boolean shortOverflow(Float value)
Float - the input valuepublic static boolean shortOverflow(Long value)
Long - the input valuepublic static boolean shortOverflow(Integer value)
Integer - the input valuepublic static boolean shortOverflow(Short value)
Short - the input valuepublic static boolean shortOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean shortOverflow(BigInteger value)
BigInteger - the input valuepublic static boolean intOverflow(Double value)
Double - the input valuepublic static boolean intOverflow(Float value)
Float - the input valuepublic static boolean intOverflow(Long value)
Long - the input valuepublic static boolean intOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean intOverflow(BigInteger value)
BigInteger - the input valuepublic static boolean longOverflow(Double value)
Double - the input valuepublic static boolean longOverflow(Float value)
Float - the input valuepublic static boolean longOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean longOverflow(BigInteger value)
BigInteger - the input valuepublic static boolean floatOverflow(Double value)
Double - the input valuepublic static boolean floatOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean floatOverflow(BigInteger value)
BigInteger - the input valuepublic static boolean doubleOverflow(BigDecimal value)
BigDecimal - the input valuepublic static boolean doubleOverflow(BigInteger value)
BigInteger - the input valuepublic static void overflowError(Number val)
Number - the numberArithmeticException - on overflowCopyright © 2017. All rights reserved.