Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for cluster (0.17 sec)

  1. guava-tests/test/com/google/common/collect/AbstractHashFloodingTest.java

                    strs ->
                        new CountsHashCodeAndEquals(
                            String.join("", strs),
                            () -> counter.hashCode++,
                            () -> counter.equals++,
                            () -> counter.compareTo++)));
        assertEquals(
            result.get(0).delegateString.hashCode(),
            result.get(result.size() - 1).delegateString.hashCode());
        return result;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 21:01:39 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/MultiReaderTest.java

        String testString = "abcdefgh";
        final CharSource source = newCharSource(testString);
        final int[] counter = new int[1];
        CharSource reader =
            new CharSource() {
              @Override
              public Reader openStream() throws IOException {
                if (counter[0]++ != 0) {
                  throw new IllegalStateException("More than one source open");
                }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

        ClosingFuture<Closeable> closingFuture =
            ClosingFuture.submit(
                new ClosingCallable<Closeable>() {
                  @Override
                  public Closeable call(DeferredCloser closer) throws Exception {
                    return closer.eventuallyClose(mockCloseable, executor);
                  }
                },
                executor);
        closingFuture.finishToValueAndCloser(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

              if (newValue == 0) {
                // Just CASed to 0; remove the entry to clean up the map. If the removal fails,
                // another thread has already replaced it with a new counter, which is fine.
                countMap.remove(element, existingCounter);
              }
              return oldValue;
            }
          } else {
            return 0;
          }
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

                        return (int) misses.incrementAndGet();
                      }
                    });
    
        // To start, fill up the cache.
        // Each miss both increments the counter and causes the map to grow by one,
        // so until evictions begin, the size of the map is the greatest return
        // value seen so far
        while (cache.getUnchecked(nextRandomKey()) < maximumSize) {}
    
        requests.set(0);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/ByteSourceTest.java

    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.Iterables;
    import com.google.common.hash.Hashing;
    import com.google.common.io.Closer.LoggingSuppressor;
    import com.google.common.primitives.UnsignedBytes;
    import com.google.common.testing.TestLogHandler;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Lists.java

       *
       * <p>Note that if any input list is empty, the Cartesian product will also be empty. If no lists
       * at all are provided (an empty list), the resulting Cartesian product has one element, an empty
       * list (counter-intuitive, but mathematically consistent).
       *
       * <p><i>Performance notes:</i> while the cartesian product of lists of size {@code m, n, p} is a
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 16:48:36 GMT 2024
    - 41.5K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/LocalCache.java

         * crossed or a write occurs on the segment.
         */
        final Queue<ReferenceEntry<K, V>> recencyQueue;
    
        /**
         * A counter of the number of reads since the last write, used to drain queues on a small
         * fraction of read operations.
         */
        final AtomicInteger readCount = new AtomicInteger();
    
        /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/CountingInputStreamTest.java

        assertEquals(-1, counter.read(new byte[30]));
        assertEquals(20, counter.getCount());
      }
    
      @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte
      public void testMark() throws Exception {
        assertTrue(counter.markSupported());
        assertEquals(10, counter.read(new byte[10]));
        assertEquals(10, counter.getCount());
        counter.mark(5);
        counter.read();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.5K bytes
    - Viewed (0)
Back to top