- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for putIfAbsent (0.4 sec)
-
android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
// since get returned null, try a putIfAbsent; that fails due to a simulated race when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(existingZero); // since the putIfAbsent returned a zero, we'll try to replace... when(backingMap.replace(eq(KEY), eq(existingZero), isA(AtomicInteger.class))).thenReturn(false); // ...and then putIfAbsent. Simulate failure on bothRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Dec 08 22:42:14 UTC 2025 - 16.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
while (true) { AtomicInteger existingCounter = safeGet(countMap, element); if (existingCounter == null) { existingCounter = countMap.putIfAbsent(element, new AtomicInteger(occurrences)); if (existingCounter == null) { return 0; } // existingCounter != null: fall through to operate against the existing AtomicInteger }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Dec 08 22:42:14 UTC 2025 - 22.3K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedCompositeBeanHelper.java
if (!Modifier.isStatic(method.getModifiers()) && method.getParameterCount() == 1) { Type[] paramTypes = method.getGenericParameterTypes(); methodMap.putIfAbsent(method.getName(), new MethodInfo(method, paramTypes[0])); } } return methodMap; } /** * Check if method is compatible with value type. */
Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Wed Nov 12 14:59:46 UTC 2025 - 12.3K bytes - Viewed (0) -
fess-crawler-opensearch/src/main/java/org/codelibs/fess/crawler/service/impl/OpenSearchUrlQueueService.java
QueueHolder queueHolder = sessionCache.get(sessionId); if (queueHolder == null) { queueHolder = new QueueHolder(); final QueueHolder prevQueueHolder = sessionCache.putIfAbsent(sessionId, queueHolder); return prevQueueHolder == null ? queueHolder : prevQueueHolder; } return queueHolder; } /**
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Thu Nov 20 08:40:57 UTC 2025 - 16.9K bytes - Viewed (1) -
guava-tests/test/com/google/common/collect/MapsTest.java
assertThrows(UnsupportedOperationException.class, () -> unmod.replaceAll((k, v) -> v)); assertThrows(UnsupportedOperationException.class, () -> unmod.putIfAbsent(3, "three")); assertThrows(UnsupportedOperationException.class, () -> unmod.replace(3, "three", "four")); assertThrows(UnsupportedOperationException.class, () -> unmod.replace(3, "four")); assertThrows(
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 22:56:33 UTC 2025 - 65K bytes - Viewed (0) -
guava/src/com/google/common/collect/Maps.java
@Override public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { throw new UnsupportedOperationException(); } @Override public @Nullable V putIfAbsent(K key, V value) { throw new UnsupportedOperationException(); } @Override public boolean remove(@Nullable Object key, @Nullable Object value) {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 17 22:50:48 UTC 2025 - 163.5K bytes - Viewed (0)