Class MathPreconditions

java.lang.Object
org.docx4j.com.google.common.math.MathPreconditions

@GwtCompatible @CanIgnoreReturnValue final class MathPreconditions extends Object
A collection of preconditions for math functions.
  • Constructor Details

    • MathPreconditions

      private MathPreconditions()
  • Method Details

    • checkPositive

      static int checkPositive(@Nullable String role, int x)
    • checkPositive

      static long checkPositive(@Nullable String role, long x)
    • checkPositive

      static BigInteger checkPositive(@Nullable String role, BigInteger x)
    • checkNonNegative

      static int checkNonNegative(@Nullable String role, int x)
    • checkNonNegative

      static long checkNonNegative(@Nullable String role, long x)
    • checkNonNegative

      static BigInteger checkNonNegative(@Nullable String role, BigInteger x)
    • checkNonNegative

      static double checkNonNegative(@Nullable String role, double x)
    • checkRoundingUnnecessary

      static void checkRoundingUnnecessary(boolean condition)
    • checkInRangeForRoundingInputs

      static void checkInRangeForRoundingInputs(boolean condition, double input, RoundingMode mode)
    • checkNoOverflow

      static void checkNoOverflow(boolean condition, String methodName, int a, int b)
    • checkNoOverflow

      static void checkNoOverflow(boolean condition, String methodName, long a, long b)