- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 47 for putIfAbsent (0.11 seconds)
-
android/guava/src/com/google/common/collect/ForwardingConcurrentMap.java
protected ForwardingConcurrentMap() {} @Override protected abstract ConcurrentMap<K, V> delegate(); @CanIgnoreReturnValue @Override public @Nullable V putIfAbsent(K key, V value) { return delegate().putIfAbsent(key, value); } @CanIgnoreReturnValue @Override public boolean remove(@Nullable Object key, @Nullable Object value) { return delegate().remove(key, value); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Feb 18 16:58:16 GMT 2025 - 2.6K bytes - Click Count (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);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 17.5K bytes - Click Count (0) -
impl/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); } }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 4.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java
map.putAll(ImmutableMap.of(two, three)); assertThat(map.get(two)).isSameInstanceAs(three); assertThat(map.putIfAbsent(one, three)).isSameInstanceAs(two); assertThat(map.get(one)).isSameInstanceAs(two); assertThat(map.putIfAbsent(three, one)).isNull(); assertThat(map.get(three)).isSameInstanceAs(one); assertThat(map.replace(one, three)).isSameInstanceAs(two);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 13.3K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/LoadingCache.java
* * <p>Caches loaded by a {@link CacheLoader} will call {@link CacheLoader#load} to load new values * into the cache. Newly loaded values are added to the cache using {@code * Cache.asMap().putIfAbsent} after loading has completed; if another value was associated with * {@code key} while the new value was loading then a removal notification will be sent for the * new value. *Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 8.3K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/PrecedenceCoreExtensionSelector.java
String key = coreExtension.getGroupId() + ":" + coreExtension.getArtifactId(); CoreExtension conflict = selectedExtensions.putIfAbsent(key, coreExtension); if (conflict != null && !Objects.equals(coreExtension.getVersion(), conflict.getVersion())) { conflicts.add(String.format(
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Mon Sep 29 15:32:43 GMT 2025 - 4.6K bytes - Click Count (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/Graph.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Tue Feb 25 08:27:34 GMT 2025 - 3.4K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LayeredOptions.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Feb 26 17:31:44 GMT 2025 - 5.7K bytes - Click Count (0) -
guava/src/com/google/common/util/concurrent/AtomicLongMap.java
* zero, associate it with {@code newValue}. Returns the previous value associated with {@code * key}, or zero if there was no mapping for {@code key}. */ long putIfAbsent(K key, long newValue) { AtomicBoolean noValue = new AtomicBoolean(false); Long result = map.compute( key, (K k, @Nullable Long oldValue) -> {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Oct 10 23:13:45 GMT 2025 - 11.7K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
return node1; } private Map<String, MojoExecution> mergeMojos(Map<String, MojoExecution> l1, Map<String, MojoExecution> l2) { l2.forEach(l1::putIfAbsent); return l1; } // gather artifactIds which are not unique so that the respective thread names can be extended with the groupId public Set<String> duplicateIds() {Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Mar 28 12:11:25 GMT 2025 - 6.1K bytes - Click Count (0)