- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for Counter (0.2 sec)
-
android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java
void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) { builder.add(counter.getAndIncrement()); } }, ADD_ARRAY { @Override void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) { double[] array = new double[RANDOM.nextInt(10)]; for (int i = 0; i < array.length; i++) { array[i] = counter.getAndIncrement(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 06 15:23:21 GMT 2023 - 20K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
/** * Multiple threads using same array of counters successfully update a number of times equal to * total count */ public void testCountingInMultipleThreads() throws InterruptedException { final AtomicDoubleArray aa = new AtomicDoubleArray(SIZE); for (int i = 0; i < SIZE; i++) { aa.set(i, (double) COUNTDOWN); } Counter c1 = new Counter(aa); Counter c2 = new Counter(aa);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 10K bytes - Viewed (0) -
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 Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.5K bytes - Viewed (0) -
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) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
/** * Multiple threads using same array of counters successfully update a number of times equal to * total count */ public void testCountingInMultipleThreads() throws InterruptedException { final AtomicDoubleArray aa = new AtomicDoubleArray(SIZE); for (int i = 0; i < SIZE; i++) { aa.set(i, (double) COUNTDOWN); } Counter c1 = new Counter(aa); Counter c2 = new Counter(aa);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 14.5K bytes - Viewed (0) -
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) -
guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java
for (int i = 0; i < 1000; i++) { final AtomicInteger counter = new AtomicInteger(); final TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create( new Callable<Integer>() { @Override public Integer call() { return counter.incrementAndGet(); } });
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 7.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java
private WorkerRunningState workerRunningState = IDLE; /** * This counter prevents an ABA issue where a thread may successfully schedule the worker, the * worker runs and exhausts the queue, another thread enqueues a task and fails to schedule the * worker, and then the first thread's call to delegate.execute() returns. Without this counter, * it would observe the QUEUING state and set it to QUEUED, and the worker would never be
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 01 21:46:34 GMT 2024 - 10.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java
} long size = spliterator.getExactSizeIfKnown(); long[] counter = {0}; spliterator.forEachRemaining( e -> { consumer.accept(e); counter[0]++; }); if (size >= 0) { assertEquals(size, counter[0]); } } }, ALTERNATE_ADVANCE_AND_SPLIT { @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 22 18:19:31 GMT 2024 - 11.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java
for (int i = 0; i < 1000; i++) { final AtomicInteger counter = new AtomicInteger(); final TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create( new Callable<Integer>() { @Override public Integer call() { return counter.incrementAndGet(); } });
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 7.3K bytes - Viewed (0)