- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getAndUpdate (0.12 sec)
-
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java
assertBitEquals(expectedMax, a.get()); } } } /** getAndUpdate with sum stores sum of given value to current, and returns previous value */ public void testGetAndUpdateWithSum() { for (double x : VALUES) { for (double y : VALUES) { AtomicDouble a = new AtomicDouble(x); double z = a.getAndUpdate(value -> value + y); assertBitEquals(x, z);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.3K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 11.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
* @since 31.1 */ @CanIgnoreReturnValue public final double getAndAccumulate(int i, double x, DoubleBinaryOperator accumulatorFunction) { checkNotNull(accumulatorFunction); return getAndUpdate(i, oldValue -> accumulatorFunction.applyAsDouble(oldValue, x)); } /** * Atomically updates the element at index {@code i} with the results of applying the given * function to the current and given values.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 14 17:55:55 UTC 2024 - 10.3K bytes - Viewed (0)