Package com.google.common.math
Class MathPreconditions
java.lang.Object
com.google.common.math.MathPreconditions
A collection of preconditions for math functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcheckInRangeForRoundingInputs(boolean condition, double input, RoundingMode mode) (package private) static doublecheckNonNegative(String role, double x) (package private) static intcheckNonNegative(String role, int x) (package private) static longcheckNonNegative(String role, long x) (package private) static BigIntegercheckNonNegative(String role, BigInteger x) (package private) static voidcheckNoOverflow(boolean condition, String methodName, int a, int b) (package private) static voidcheckNoOverflow(boolean condition, String methodName, long a, long b) (package private) static intcheckPositive(String role, int x) (package private) static longcheckPositive(String role, long x) (package private) static BigIntegercheckPositive(String role, BigInteger x) (package private) static voidcheckRoundingUnnecessary(boolean condition)
-
Constructor Details
-
MathPreconditions
private MathPreconditions()
-
-
Method Details
-
checkPositive
-
checkPositive
-
checkPositive
-
checkNonNegative
-
checkNonNegative
-
checkNonNegative
-
checkNonNegative
-
checkRoundingUnnecessary
static void checkRoundingUnnecessary(boolean condition) -
checkInRangeForRoundingInputs
-
checkNoOverflow
-
checkNoOverflow
-