- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for getAndAdd (0.04 seconds)
-
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() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 17.5K bytes - Click Count (0) -
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(); } }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 1.9K bytes - Click Count (0) -
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); } /**
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Oct 10 23:13:45 GMT 2025 - 11.7K bytes - Click Count (0) -
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); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Apr 14 15:16:19 GMT 2025 - 3.4K bytes - Click Count (0) -
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); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Apr 14 15:16:19 GMT 2025 - 4.1K bytes - Click Count (0) -
guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
* * @param i the index * @param delta the value to add * @return the previous value */ @CanIgnoreReturnValue public final double getAndAdd(int i, double delta) { return getAndAccumulate(i, delta, Double::sum); } /** * Atomically adds the given value to the element at index {@code i}. * * @param i the indexCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 10.2K bytes - Click Count (0)