- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 47 for putIfAbsent (0.07 seconds)
-
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. */
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Nov 12 14:59:46 GMT 2025 - 12.3K bytes - Click Count (0) -
android/guava/src/com/google/common/eventbus/SubscriberRegistry.java
if (eventSubscribers == null) { CopyOnWriteArraySet<Subscriber> newSet = new CopyOnWriteArraySet<>(); eventSubscribers = MoreObjects.firstNonNull(subscribers.putIfAbsent(eventType, newSet), newSet); } eventSubscribers.addAll(eventMethodsInListener); } } /** Unregisters all subscribers on the given listener object. */ void unregister(Object listener) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jul 08 18:32:10 GMT 2025 - 10.8K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
request.getGroupId(), request.getArtifactId(), result.getVersion(), result.getRepository()); cache.putIfAbsent(key, result); } else { logger.debug( "Reusing cached resolved plugin version for {}:{} to {} from POM {}", request.getGroupId(),
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jan 29 08:17:07 GMT 2025 - 17.6K bytes - Click Count (0) -
guava/src/com/google/common/collect/AbstractBiMap.java
while (itr.hasNext()) { Entry<K, V> entry = itr.next(); K k = entry.getKey(); V v = entry.getValue(); K conflict = inverse.delegate.putIfAbsent(v, k); if (conflict != null) { broken = entry; // We're definitely going to throw, but we'll try to keep the BiMap in an internally // consistent state by removing the bad entry.
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 15:50:50 GMT 2025 - 14.3K bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
alertListenerIfPresent(entry.getKey(), entry.getValue().getValue(), RemovalCause.EXPLICIT); } } cachingHashMap.clear(); } @Override public V putIfAbsent(K key, V value) { V currentValue = get(key); if (currentValue != null) { return currentValue; } return put(key, value); } @CanIgnoreReturnValue @Override
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 21.8K bytes - Click Count (0) -
guava/src/com/google/common/util/concurrent/Striped.java
L existing = locks.get(index); if (existing != null) { return existing; } L created = supplier.get(); existing = locks.putIfAbsent(index, created); return MoreObjects.firstNonNull(existing, created); } @Override public int size() { return size; } } /** A bit mask were all bits are set. */
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 16 22:01:32 GMT 2025 - 20.6K bytes - Click Count (0) -
guava/src/com/google/common/collect/Synchronized.java
synchronized (mutex) { return delegate().put(key, value); } } @Override public @Nullable V putIfAbsent(K key, V value) { synchronized (mutex) { return delegate().putIfAbsent(key, value); } } @Override public boolean replace(K key, V oldValue, V newValue) { synchronized (mutex) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Aug 08 15:11:10 GMT 2025 - 56.9K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
ConcurrentMap<Signature, Method> map = Maps.newConcurrentMap(); for (Method method : getVisibleMethods(cls)) { if (!Invokable.from(method).isStatic()) { map.putIfAbsent(new Signature(method), method); } } return map.values(); } private ImmutableList<Method> getVisibleMethods(Class<?> cls) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Jul 14 14:44:08 GMT 2025 - 24.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/NullPointerTester.java
ConcurrentMap<Signature, Method> map = Maps.newConcurrentMap(); for (Method method : getVisibleMethods(cls)) { if (!Invokable.from(method).isStatic()) { map.putIfAbsent(new Signature(method), method); } } return map.values(); } private ImmutableList<Method> getVisibleMethods(Class<?> cls) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Jul 14 14:44:08 GMT 2025 - 25.4K bytes - Click Count (0) -
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(
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 22:56:33 GMT 2025 - 65K bytes - Click Count (0)