Package com.google.common.math
Class MathPreconditions
- java.lang.Object
-
- com.google.common.math.MathPreconditions
-
@GwtCompatible final class MathPreconditions extends java.lang.Object
A collection of preconditions for math functions.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MathPreconditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
checkInRange(boolean condition)
(package private) static double
checkNonNegative(java.lang.String role, double x)
(package private) static int
checkNonNegative(java.lang.String role, int x)
(package private) static long
checkNonNegative(java.lang.String role, long x)
(package private) static java.math.BigInteger
checkNonNegative(java.lang.String role, java.math.BigInteger x)
(package private) static void
checkNoOverflow(boolean condition)
(package private) static int
checkPositive(java.lang.String role, int x)
(package private) static long
checkPositive(java.lang.String role, long x)
(package private) static java.math.BigInteger
checkPositive(java.lang.String role, java.math.BigInteger x)
(package private) static void
checkRoundingUnnecessary(boolean condition)
-
-
-
Method Detail
-
checkPositive
static int checkPositive(@Nullable java.lang.String role, int x)
-
checkPositive
static long checkPositive(@Nullable java.lang.String role, long x)
-
checkPositive
static java.math.BigInteger checkPositive(@Nullable java.lang.String role, java.math.BigInteger x)
-
checkNonNegative
static int checkNonNegative(@Nullable java.lang.String role, int x)
-
checkNonNegative
static long checkNonNegative(@Nullable java.lang.String role, long x)
-
checkNonNegative
static java.math.BigInteger checkNonNegative(@Nullable java.lang.String role, java.math.BigInteger x)
-
checkNonNegative
static double checkNonNegative(@Nullable java.lang.String role, double x)
-
checkRoundingUnnecessary
static void checkRoundingUnnecessary(boolean condition)
-
checkInRange
static void checkInRange(boolean condition)
-
checkNoOverflow
static void checkNoOverflow(boolean condition)
-
-