- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for getAndUpdate (0.3 sec)
-
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
} } } } /** getAndUpdate adds given value to current, and returns previous value */ public void testGetAndUpdateWithSum() { 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.getAndUpdate(i, value -> value + y); assertBitEquals(x, z);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 14.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicLongMap.java
return getAndUpdate(key, oldValue -> accumulatorFunction.applyAsLong(oldValue, x)); } /** * Associates {@code newValue} with {@code key} in this map, and returns the value previously * associated with {@code key}, or zero if there was no such value. */ @CanIgnoreReturnValue public long put(K key, long newValue) { return getAndUpdate(key, x -> newValue); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 11.7K bytes - Viewed (0)