Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 77 for nextLink (0.46 sec)

  1. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertNotNull(ArbitraryInstances.get(Ticker.class));
        assertFreshInstanceReturned(Random.class);
        assertEquals(
            ArbitraryInstances.get(Random.class).nextInt(),
            ArbitraryInstances.get(Random.class).nextInt());
      }
    
      public void testGet_concurrent() {
        assertTrue(ArbitraryInstances.get(BlockingDeque.class).isEmpty());
        assertTrue(ArbitraryInstances.get(BlockingQueue.class).isEmpty());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

        for (int i = 0; i < reps; i++) {
          dummy += cache.getUnchecked(nextRandomKey());
        }
        requests.addAndGet(reps);
        return dummy;
      }
    
      private int nextRandomKey() {
        int a = random.nextInt(max);
    
        /*
         * For example, if concentration=2.0, the following takes the square root of
         * the uniformly-distributed random integer, then truncates any fractional
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          }
          // We need to ensure that at least 4 bytes have been put into the hasher or else
          // Hasher#hash will throw an ISE.
          int intToPut = random.nextInt();
          for (Hasher hasher : sinksAndControl) {
            hasher.putInt(intToPut);
          }
          for (Sink sink : sinks) {
            HashCode unused = sink.hash();
          }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          }
          // We need to ensure that at least 4 bytes have been put into the hasher or else
          // Hasher#hash will throw an ISE.
          int intToPut = random.nextInt();
          for (Hasher hasher : sinksAndControl) {
            hasher.putInt(intToPut);
          }
          for (Sink sink : sinks) {
            HashCode unused = sink.hash();
          }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/Striped64.java

       */
      final void retryUpdate(long x, int @Nullable [] hc, boolean wasUncontended) {
        int h;
        if (hc == null) {
          threadHashCode.set(hc = new int[1]); // Initialize randomly
          int r = rng.nextInt(); // Avoid zero to allow xorShift rehash
          h = hc[0] = (r == 0) ? 1 : r;
        } else h = hc[0];
        boolean collide = false; // True if last slot nonempty
        for (; ; ) {
          Cell[] as;
          Cell a;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jan 15 22:17:15 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/CharMatcherTest.java

          assertFalse(len4.matches(c));
        }
    
        Random rand = new Random(1234);
        for (int testCase = 0; testCase < 100; testCase++) {
          char[] chars = randomChars(rand, rand.nextInt(63) + 1);
          CharMatcher m = SmallCharMatcher.from(bitSet(chars), new String(chars));
          checkExactMatches(m, chars);
        }
      }
    
      static void checkExactMatches(CharMatcher m, char[] chars) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 30.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

        final int min;
        final int max;
    
        ListSizeDistribution(int min, int max) {
          this.min = min;
          this.max = max;
        }
    
        public int chooseSize(Random random) {
          return random.nextInt(max - min + 1) + min;
        }
      }
    
      private BenchmarkHelpers() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        CacheLoader<String, String> countingIdentityLoader =
            new CacheLoader<String, String>() {
              @Override
              public String load(String key) throws InterruptedException {
                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  9. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertNotNull(ArbitraryInstances.get(Ticker.class));
        assertFreshInstanceReturned(Random.class);
        assertEquals(
            ArbitraryInstances.get(Random.class).nextInt(),
            ArbitraryInstances.get(Random.class).nextInt());
      }
    
      public void testGet_concurrent() {
        assertTrue(ArbitraryInstances.get(BlockingDeque.class).isEmpty());
        assertTrue(ArbitraryInstances.get(BlockingQueue.class).isEmpty());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        CacheLoader<String, String> countingIdentityLoader =
            new CacheLoader<String, String>() {
              @Override
              public String load(String key) throws InterruptedException {
                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
Back to top