Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for getAndIncrement (0.1 sec)

  1. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

            builder.add(counter.getAndIncrement());
          }
        },
        ADD_ARRAY {
          @Override
          void doIt(ImmutableIntArray.Builder builder, AtomicInteger counter) {
            int[] array = new int[RANDOM.nextInt(10)];
            for (int i = 0; i < array.length; i++) {
              array[i] = counter.getAndIncrement();
            }
            builder.addAll(array);
          }
        },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

            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();
            }
            builder.addAll(array);
          }
        },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

            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();
            }
            builder.addAll(array);
          }
        },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

      public void testExecute_idempotent() {
        final AtomicInteger runCalled = new AtomicInteger();
        list.add(
            new Runnable() {
              @Override
              public void run() {
                runCalled.getAndIncrement();
              }
            },
            directExecutor());
        list.execute();
        assertEquals(1, runCalled.get());
        list.execute();
        assertEquals(1, runCalled.get());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(0L, map.get(key));
        assertFalse(map.containsKey(key));
    
        assertEquals(0L, map.getAndIncrement(key));
        assertEquals(1L, map.get(key));
    
        assertEquals(1L, map.getAndDecrement(key));
        assertEquals(0L, map.get(key));
        assertTrue(map.containsKey(key));
    
        assertEquals(0L, map.getAndIncrement(key));
        assertEquals(1L, map.get(key));
      }
    
      public void testDecrementAndGet() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

      public void testExecute_idempotent() {
        final AtomicInteger runCalled = new AtomicInteger();
        list.add(
            new Runnable() {
              @Override
              public void run() {
                runCalled.getAndIncrement();
              }
            },
            directExecutor());
        list.execute();
        assertEquals(1, runCalled.get());
        list.execute();
        assertEquals(1, runCalled.get());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/suggest/index/contents/document/ESSourceReaderTest.java

                        assertTrue(source.get("field1").toString().startsWith("test"));
                        valueSet.add(source.get("field1").toString());
                        count.getAndIncrement();
                    }
                });
            }
    
            for (Thread th : threads) {
                th.start();
            }
            for (Thread th : threads) {
                th.join();
            }
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/hash/LongAddables.java

      public static LongAddable create() {
        return SUPPLIER.get();
      }
    
      private static final class PureJavaLongAddable extends AtomicLong implements LongAddable {
        @Override
        public void increment() {
          getAndIncrement();
        }
    
        @Override
        public void add(long x) {
          getAndAdd(x);
        }
    
        @Override
        public long sum() {
          return get();
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 04 17:27:14 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/LongAddables.java

      public static LongAddable create() {
        return SUPPLIER.get();
      }
    
      private static final class PureJavaLongAddable extends AtomicLong implements LongAddable {
        @Override
        public void increment() {
          getAndIncrement();
        }
    
        @Override
        public void add(long x) {
          getAndAdd(x);
        }
    
        @Override
        public long sum() {
          return get();
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 04 17:27:14 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                          case 2:
                            map.addAndGet(key, delta);
                            threadSum += delta;
                            break;
                          case 3:
                            map.getAndIncrement(key);
                            threadSum++;
                            break;
                          case 4:
                            map.getAndDecrement(key);
                            threadSum--;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top