@Deprecated public final class CheckedMath extends Object
ArithmeticException on underflow or overflow.| Modifier and Type | Method and Description |
|---|---|
static int |
absolute(int n)
Deprecated.
Return the absolute value of an integer.
|
static long |
absolute(long n)
Deprecated.
Return the absolute value of an integer.
|
static int |
add(int n,
int m)
Deprecated.
Add integers.
|
static long |
add(long n,
long m)
Deprecated.
Add integers.
|
static int |
divide(int n,
int m)
Deprecated.
Divide integers.
|
static long |
divide(long n,
long m)
Deprecated.
Divide integers.
|
static int |
multiply(int n,
double m)
Deprecated.
Multiply integers.
|
static int |
multiply(int n,
int m)
Deprecated.
Multiply integers.
|
static long |
multiply(long n,
double m)
Deprecated.
Multiply integers.
|
static long |
multiply(long n,
long m)
Deprecated.
Multiply integers.
|
static int |
negate(int n)
Deprecated.
Negate an integer.
|
static long |
negate(long n)
Deprecated.
Negate an integer.
|
static int |
subtract(int n,
int m)
Deprecated.
Subtract integers.
|
static long |
subtract(long n,
long m)
Deprecated.
Subtract integers.
|
public static int absolute(int n)
throws ArithmeticException
n - The value.abs(n)ArithmeticException - Iff the absolute value would overflow.public static long absolute(long n)
throws ArithmeticException
n - The value.abs(n)ArithmeticException - Iff the absolute value would overflow.public static int add(int n,
int m)
throws ArithmeticException
n - The left value.m - The right value.n + mArithmeticException - Iff the addition would overflow.public static long add(long n,
long m)
throws ArithmeticException
n - The left value.m - The right value.n + mArithmeticException - Iff the addition would overflow.public static int divide(int n,
int m)
throws ArithmeticException
n - The left value.m - The right value.n / mArithmeticException - Iff the division would overflow.public static long divide(long n,
long m)
throws ArithmeticException
n - The left value.m - The right value.n / mArithmeticException - Iff the division would overflow.public static int multiply(int n,
double m)
throws ArithmeticException
n - The left value.m - The right value.n * mArithmeticException - Iff the multiplication would overflow.public static int multiply(int n,
int m)
throws ArithmeticException
n - The left value.m - The right value.n * mArithmeticException - Iff the multiplication would overflow.public static long multiply(long n,
double m)
throws ArithmeticException
n - The left value.m - The right value.n * mArithmeticException - Iff the multiplication would overflow.public static long multiply(long n,
long m)
throws ArithmeticException
n - The left value.m - The right value.n * mArithmeticException - Iff the multiplication would overflow.public static int negate(int n)
throws ArithmeticException
n - The value.-nArithmeticException - Iff the negation would overflow.public static long negate(long n)
throws ArithmeticException
n - The value.-nArithmeticException - Iff the negation would overflow.public static int subtract(int n,
int m)
throws ArithmeticException
n - The left value.m - The right value.n - mArithmeticException - Iff the subtraction would overflow.public static long subtract(long n,
long m)
throws ArithmeticException
n - The left value.m - The right value.n - mArithmeticException - Iff the subtraction would overflow.Copyright © 2017 <code@io7m.com> http://io7m.com