- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for putIfAbsent (0.09 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java
public void testPutIfAbsent_supportedAbsent() { assertNull( "putIfAbsent(notPresent, value) should return null", getMap().putIfAbsent(k3(), v3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:51:04 UTC 2024 - 4.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapPutIfAbsentTester.java
assertNull("putIfAbsent(notPresent, value) should return null", putIfAbsent(e3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(), getMap().putIfAbsent(k0(), v3())); expectUnchanged(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 20:00:30 UTC 2024 - 4.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java
public void testPutIfAbsent_supportedAbsent() { assertNull( "putIfAbsent(notPresent, value) should return null", getMap().putIfAbsent(k3(), v3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 20:00:30 UTC 2024 - 4.8K bytes - Viewed (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); } }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.6K 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));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 12.4K bytes - Viewed (0) -
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));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 12.4K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 21.1K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/Graph.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
assertEquals(Integer.valueOf(50), asMap.get(10)); assertEquals(null, cache.getIfPresent(2)); assertEquals(null, asMap.get(2)); asMap.putIfAbsent(2, 20); asMap.putIfAbsent(10, 20); assertEquals(Integer.valueOf(20), cache.getIfPresent(2)); assertEquals(Integer.valueOf(20), asMap.get(2)); assertEquals(Integer.valueOf(50), cache.getIfPresent(10));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 14.4K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
for (Dependency dependency : source.getDependencies()) { String key = dependency.getManagementKey(); Dependency present = dependencies.putIfAbsent(key, dependency); if (present != null && !equals(dependency, present) && !directDependencies.contains(key)) { // TODO: https://issues.apache.org/jira/browse/MNG-8004
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 6.1K bytes - Viewed (0)