Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for ArithmeticException (0.98 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/google/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/LongMathTest.java

            // unless all n are fair game with this k
            assertThrows(
                ArithmeticException.class,
                () -> simpleBinomial(LongMath.biggestSimpleBinomials[k] + 1, k));
          }
        }
        int k = LongMath.biggestSimpleBinomials.length;
        assertThrows(ArithmeticException.class, () -> simpleBinomial(2 * k, k));
      }
    
      @AndroidIncompatible // slow
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java

              int unused = IntMath.checkedAdd(a, b);
              return true;
            } catch (ArithmeticException e) {
              return false;
            }
          }
    
          @Override
          public boolean noAddOverflow(long a, long b) {
            try {
              long unused = LongMath.checkedAdd(a, b);
              return true;
            } catch (ArithmeticException e) {
              return false;
            }
          }
    
          @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Internal.java

    @J2ktIncompatible
    @GwtIncompatible // java.time.Duration
    final class Internal {
    
      /**
       * Returns the number of nanoseconds of the given duration without throwing or overflowing.
       *
       * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either
       * {@link Long#MAX_VALUE} or {@link Long#MIN_VALUE}. This behavior can be useful when decomposing
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 15:16:19 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/IntMathTest.java

        for (int x : POSITIVE_INTEGER_CANDIDATES) {
          for (int m : NEGATIVE_INTEGER_CANDIDATES) {
            assertThrows(ArithmeticException.class, () -> IntMath.mod(x, m));
          }
        }
      }
    
      public void testModZeroModulusFails() {
        for (int x : ALL_INTEGER_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> IntMath.mod(x, 0));
        }
      }
    
      public void testGCD() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/math/LongMath.java

       *
       * @throws IllegalArgumentException if {@code x <= 0}
       * @throws ArithmeticException of the next-higher power of two is not representable as a {@code
       *     long}, i.e. when {@code x > 2^62}
       * @since 20.0
       */
      public static long ceilingPowerOfTwo(long x) {
        checkPositive("x", x);
        if (x > MAX_SIGNED_POWER_OF_TWO) {
          throw new ArithmeticException("ceilingPowerOfTwo(" + x + ") is not representable as a long");
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.9K bytes
    - Viewed (0)
Back to top