Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for getAndAdd (0.08 sec)

  1. guava/src/com/google/common/hash/LongAddables.java

        @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)
  2. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(0L, map.get(key));
        assertFalse(map.containsKey(key));
    
        assertEquals(0L, map.getAndAdd(key, value));
        assertEquals(value, map.get(key));
    
        assertEquals(value, map.getAndAdd(key, -1 * value));
        assertEquals(0L, map.get(key));
        assertTrue(map.containsKey(key));
    
        assertEquals(0L, map.getAndAdd(key, value));
        assertEquals(value, map.get(key));
      }
    
      public void testPut() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/LongAddables.java

        @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)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

          assertBitEquals(prev, at.getAndSet(x));
          prev = x;
        }
      }
    
      /** getAndAdd returns previous value and adds given value */
      public void testGetAndAdd() {
        for (double x : VALUES) {
          for (double y : VALUES) {
            AtomicDouble a = new AtomicDouble(x);
            double z = a.getAndAdd(y);
            assertBitEquals(x, z);
            assertBitEquals(x + y, a.get());
          }
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       */
      @CanIgnoreReturnValue
      public long getAndIncrement(K key) {
        return getAndAdd(key, 1);
      }
    
      /**
       * Decrements by one the value currently associated with {@code key}, and returns the old value.
       */
      @CanIgnoreReturnValue
      public long getAndDecrement(K key) {
        return getAndAdd(key, -1);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                          case 4:
                            map.getAndDecrement(key);
                            threadSum--;
                            break;
                          case 5:
                            map.getAndAdd(key, delta);
                            threadSum += delta;
                            break;
                          case 6:
                            long oldValue = map.put(key, delta);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

            prev = x;
          }
        }
      }
    
      /** getAndAdd returns previous value and adds given value */
      public void testGetAndAdd() {
        AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i : new int[] {0, SIZE - 1}) {
          for (double x : VALUES) {
            for (double y : VALUES) {
              aa.set(i, x);
              double z = aa.getAndAdd(i, y);
              assertBitEquals(x, z);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/suggest/index/contents/document/ESSourceReader.java

                    break;
                } catch (final Exception e) {
                    exception = new RuntimeException(e);
                    scrollId = null;
                }
            }
    
            docCount.getAndAdd(queue.size());
    
            if (exception != null) {
                throw exception;
            }
        }
    
        protected static long getLimitDocNum(final long total, final long limitPercentage, final long limitNumber) {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       */
      @CanIgnoreReturnValue
      public long getAndIncrement(K key) {
        return getAndAdd(key, 1);
      }
    
      /**
       * Decrements by one the value currently associated with {@code key}, and returns the old value.
       */
      @CanIgnoreReturnValue
      public long getAndDecrement(K key) {
        return getAndAdd(key, -1);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

      public FakeTicker setAutoIncrementStep(Duration autoIncrementStep) {
        return setAutoIncrementStep(autoIncrementStep.toNanos(), NANOSECONDS);
      }
    
      @Override
      public long read() {
        return nanos.getAndAdd(autoIncrementStepNanos);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top