- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for getAndSet (0.13 sec)
-
guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
Count existingCounter; int oldCount; if (count == 0) { existingCounter = backingMap.remove(element); oldCount = getAndSet(existingCounter, count); } else { existingCounter = backingMap.get(element); oldCount = getAndSet(existingCounter, count); if (existingCounter == null) { backingMap.put(element, new Count(count)); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 10.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Count.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Aug 05 00:40:25 UTC 2021 - 1.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/CountTest.java
public void testAddAndGet() { Count holder = new Count(20); assertEquals(21, holder.addAndGet(1)); } public void testGetAndSet() { Count holder = new Count(10); assertEquals(10, holder.getAndSet(20)); assertEquals(20, holder.get()); } public void testSet() { Count holder = new Count(10); holder.set(20); assertEquals(20, holder.get()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 19 20:34:55 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/CountTest.java
public void testAddAndGet() { Count holder = new Count(20); assertEquals(21, holder.addAndGet(1)); } public void testGetAndSet() { Count holder = new Count(10); assertEquals(10, holder.getAndSet(20)); assertEquals(20, holder.get()); } public void testSet() { Count holder = new Count(10); holder.set(20); assertEquals(20, holder.get()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 19 20:34:55 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Count.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Aug 05 00:40:25 UTC 2021 - 1.6K bytes - Viewed (0) -
guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java
public void run() { assertFalse("previous tearDown should have run before setUp", setUpRan.getAndSet(true)); } }; Runnable tearDown = new Runnable() { @Override public void run() { assertTrue("setUp should have run", setUpRan.getAndSet(false)); } }; return MapTestSuiteBuilder.using(new CheckSetUpHashMapGenerator(setUpRan))
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 11.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java
} assertBitEquals(x, at.get()); prev = x; } } /** getAndSet returns previous value and sets to given value */ public void testGetAndSet() { double prev = Math.E; AtomicDouble at = new AtomicDouble(prev); for (double x : VALUES) { assertBitEquals(prev, at.getAndSet(x)); prev = x; } } /** getAndAdd returns previous value and adds given value */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.3K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java
public void run() { assertFalse("previous tearDown should have run before setUp", setUpRan.getAndSet(true)); } }; Runnable tearDown = new Runnable() { @Override public void run() { assertTrue("setUp should have run", setUpRan.getAndSet(false)); } }; return MapTestSuiteBuilder.using(new CheckSetUpHashMapGenerator(setUpRan))
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 11.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
* * @param i the index * @param newValue the new value * @return the previous value */ public final double getAndSet(int i, double newValue) { long next = doubleToRawLongBits(newValue); return longBitsToDouble(longs.getAndSet(i, next)); } /** * Atomically sets the element at position {@code i} to the given updated value if the current
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 14 17:55:55 UTC 2024 - 10.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
prev = x; } } } /** getAndSet returns previous value and sets to given value at given index */ public void testGetAndSet() { AtomicDoubleArray aa = new AtomicDoubleArray(SIZE); for (int i : new int[] {0, SIZE - 1}) { double prev = 0.0; for (double x : VALUES) { assertBitEquals(prev, aa.getAndSet(i, x)); prev = x; } } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 14.6K bytes - Viewed (0)