- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 54 for putIfAbsent (0.22 sec)
-
src/main/java/org/codelibs/core/beans/factory/BeanDescFactory.java
*/ package org.codelibs.core.beans.factory; import static org.codelibs.core.collection.CollectionsUtil.newConcurrentHashMap; import static org.codelibs.core.collection.CollectionsUtil.putIfAbsent; import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull; import java.util.concurrent.ConcurrentMap; import org.codelibs.core.beans.BeanDesc; import org.codelibs.core.beans.impl.BeanDescImpl;
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 2.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
} } public void testPutIfAbsent() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2)); assertEquals(Integer.valueOf(1), map.get("foo")); assertNull(map.putIfAbsent("bar", 3)); assertEquals(Integer.valueOf(3), map.get("bar")); } public void testRemove() { TestMap map = new TestMap(); map.put("foo", 1);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingConcurrentMap.java
protected ForwardingConcurrentMap() {} @Override protected abstract ConcurrentMap<K, V> delegate(); @CanIgnoreReturnValue @Override @CheckForNull public V putIfAbsent(K key, V value) { return delegate().putIfAbsent(key, value); } @CanIgnoreReturnValue @Override public boolean remove(@CheckForNull Object key, @CheckForNull Object value) { return delegate().remove(key, value); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 29 19:42:21 GMT 2021 - 2.5K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/internal/impl/Graph.java
} private static List<String> visitAll( Collection<Vertex> children, Map<Vertex, DfsState> stateMap, List<String> list) { for (Vertex v : children) { DfsState state = stateMap.putIfAbsent(v, DfsState.VISITING); if (state == null) { visitAll(v.children, stateMap, list); stateMap.put(v, DfsState.VISITED); list.add(v.label); } }
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Fri Apr 12 10:50:18 GMT 2024 - 4.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
while (true) { AtomicInteger existingCounter = Maps.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 }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 20.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java
for (int i = 0; i < ITERATIONS; i++) { long before = map.get(key); long result = map.putIfAbsent(key, newValue); long after = map.get(key); assertEquals(before, result); assertEquals(before == 0 ? newValue : before, after); map.remove(key); before = map.get(key); result = map.putIfAbsent(key, newValue); after = map.get(key); assertEquals(0, before);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 17.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java
assertNull(map.put(one, two)); assertSame(two, map.get(one)); map.putAll(ImmutableMap.of(two, three)); assertSame(three, map.get(two)); assertSame(two, map.putIfAbsent(one, three)); assertSame(two, map.get(one)); assertNull(map.putIfAbsent(three, one)); assertSame(one, map.get(three)); assertSame(two, map.replace(one, three)); assertSame(three, map.get(one));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 12.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/ForwardingConcurrentMap.java
protected ForwardingConcurrentMap() {} @Override protected abstract ConcurrentMap<K, V> delegate(); @CanIgnoreReturnValue @Override @CheckForNull public V putIfAbsent(K key, V value) { return delegate().putIfAbsent(key, value); } @CanIgnoreReturnValue @Override public boolean remove(@CheckForNull Object key, @CheckForNull Object value) { return delegate().remove(key, value); }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Tue Jun 29 19:42:21 GMT 2021 - 2.5K bytes - Viewed (0) -
maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultLifecycleBindingsInjector.java
Plugin cur = plugins.putIfAbsent(plugin, plugin); if (cur != null) { Map<String, PluginExecution> execs = new LinkedHashMap<>(); cur.getExecutions().forEach(e -> execs.put(e.getId(), e)); plugin.getExecutions().forEach(e -> { int i = 0; String id = e.getId(); while (execs.putIfAbsent(id, e.withId(id)) != null) {
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Fri Apr 12 10:50:18 GMT 2024 - 8.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/ConcurrentHashMultiset.java
while (true) { AtomicInteger existingCounter = Maps.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 }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 20.9K bytes - Viewed (0)