Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for checkNoOverflow (0.47 sec)

The limit of a search time was exceeded. The partial result might be displayed.

  1. android/guava/src/com/google/common/math/MathPreconditions.java

        }
      }
    
      static void checkNoOverflow(boolean condition, String methodName, int a, int b) {
        if (!condition) {
          throw new ArithmeticException("overflow: " + methodName + "(" + a + ", " + b + ")");
        }
      }
    
      static void checkNoOverflow(boolean condition, String methodName, long a, long b) {
        if (!condition) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        }
      }
    
      public void testCheckNoOverflow_success() {
        MathPreconditions.checkNoOverflow(true, "testCheckNoOverflow_success", 0, 0);
      }
    
      public void testCheckNoOverflow_failure() {
        try {
          MathPreconditions.checkNoOverflow(false, "testCheckNoOverflow_failure", 0, 0);
          fail();
        } catch (ArithmeticException expected) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/LongMath.java

         */
        if (leadingZeros > Long.SIZE + 1) {
          return a * b;
        }
        checkNoOverflow(leadingZeros >= Long.SIZE, "checkedMultiply", a, b);
        checkNoOverflow(a >= 0 | b != Long.MIN_VALUE, "checkedMultiply", a, b);
        long result = a * b;
        checkNoOverflow(a == 0 || result / a == b, "checkedMultiply", a, b);
        return result;
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/LongMath.java

         */
        if (leadingZeros > Long.SIZE + 1) {
          return a * b;
        }
        checkNoOverflow(leadingZeros >= Long.SIZE, "checkedMultiply", a, b);
        checkNoOverflow(a >= 0 | b != Long.MIN_VALUE, "checkedMultiply", a, b);
        long result = a * b;
        checkNoOverflow(a == 0 || result / a == b, "checkedMultiply", a, b);
        return result;
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/Longs.java

          length += array.length;
        }
        long[] result = new long[checkNoOverflow(length)];
        int pos = 0;
        for (long[] array : arrays) {
          System.arraycopy(array, 0, result, pos, array.length);
          pos += array.length;
        }
        return result;
      }
    
      private static int checkNoOverflow(long result) {
        checkArgument(
            result == (int) result,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/primitives/Longs.java

          length += array.length;
        }
        long[] result = new long[checkNoOverflow(length)];
        int pos = 0;
        for (long[] array : arrays) {
          System.arraycopy(array, 0, result, pos, array.length);
          pos += array.length;
        }
        return result;
      }
    
      private static int checkNoOverflow(long result) {
        checkArgument(
            result == (int) result,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 28.8K bytes
    - Viewed (0)
Back to top