- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getAndUpdate (0.73 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/AtomicDouble.java
* @since 31.1 */ @CanIgnoreReturnValue public final double getAndAccumulate(double x, DoubleBinaryOperator accumulatorFunction) { checkNotNull(accumulatorFunction); return getAndUpdate(oldValue -> accumulatorFunction.applyAsDouble(oldValue, x)); } /** * Atomically updates the current value with the results of applying the given function to the * current and given values. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 9.5K 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) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 10.2K bytes - Viewed (0)