/libcore/luni/src/test/java/libcore/java/util/ |
D | MapDefaultMethodTester.java | 303 assertEquals(5.0, m.computeIfAbsent(1, (k) -> 5.0 * k)); in test_computeIfAbsent() 308 assertEquals(1.0, m.computeIfAbsent(1, k -> 6.0 * k)); in test_computeIfAbsent() 313 assertEquals(1.0, m.computeIfAbsent(1, k -> null)); in test_computeIfAbsent() 317 assertNull(m.computeIfAbsent(100, k-> null)); in test_computeIfAbsent() 321 m.computeIfAbsent(1, null); in test_computeIfAbsent() 328 assertEquals(1.0, m.computeIfAbsent(1, k -> 1.0)); in test_computeIfAbsent() 334 assertEquals(1.0, m.computeIfAbsent(null, (k) -> 5.0 * k)); in test_computeIfAbsent() 337 m.computeIfAbsent(null, k -> 5.0); in test_computeIfAbsent()
|
D | CollectionsTest.java | 543 Collections.unmodifiableMap(new HashMap<>()).computeIfAbsent(1, k -> 1.0); in test_unmodifiableMap_computeIfAbsent() 552 Collections.unmodifiableMap(m).computeIfAbsent(1, k -> 1.0); in test_unmodifiableMap_computeIfAbsent() 926 assertThrowsUoe(() -> { map.computeIfAbsent(absentKey, k -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 938 assertThrowsUoe(() -> { map.computeIfAbsent(sampleKey, k -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 1035 assertThrowsCce(() -> { map.computeIfAbsent(new Object(), k -> presentValue); }); in check_map_isChecked() 1037 assertEquals(presentValue, map.computeIfAbsent(presentKey, k -> new Object())); in check_map_isChecked() 1038 assertThrowsCce(() -> { map.computeIfAbsent(absentKey, k -> new Object()); }); in check_map_isChecked() 1252 Collections.emptyMap().computeIfAbsent(1, k -> 5.0); in test_EmptyMap_computeIfAbsent() 1329 Collections.singletonMap(1, 11.0).computeIfAbsent(1, k -> 5.0); in test_SingletonMap_computeIfAbsent() 1570 assertSame(A_STRING, checkedMap2.computeIfAbsent(1, k -> { in test_CheckedMap_computeIfAbsent() [all …]
|
D | LinkedHashMapTest.java | 148 m.computeIfAbsent("key1", (k) -> "value3"); in test_computeIfAbsent() 157 m.computeIfAbsent("key4", (k) -> "value3"); in test_computeIfAbsent()
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | CoderResult.java | 222 return Cache.INSTANCE.malformed.computeIfAbsent(length, in malformedForLength() 247 return Cache.INSTANCE.unmappable.computeIfAbsent(length, in unmappableForLength()
|
/libcore/ojluni/src/test/java/util/LinkedHashMap/ |
D | ComputeIfAbsentAccessOrder.java | 41 map.computeIfAbsent("first", l -> null); // should do nothing in main()
|
D | Basic.java | 215 Assert.assertTrue(x.equals(m.computeIfAbsent(x, Integer::valueOf))); in testBasic()
|
/libcore/ojluni/src/test/java/util/Map/ |
D | Defaults.java | 289 assertSame(map.computeIfAbsent(null, (k) -> null), null, "not expected result"); in testComputeIfAbsentNulls() 292 … assertSame(map.computeIfAbsent(null, (k) -> EXTRA_VALUE), EXTRA_VALUE, "not mapped to result"); in testComputeIfAbsentNulls() 299 … assertSame(map.computeIfAbsent(null, (k) -> EXTRA_VALUE), EXTRA_VALUE, "not mapped to result"); in testComputeIfAbsentNulls() 312 assertSame(map.computeIfAbsent(KEYS[1], (k) -> EXTRA_VALUE), expected, description); in testComputeIfAbsent() 317 assertNull(map.computeIfAbsent(EXTRA_KEY, (k) -> null)); in testComputeIfAbsent() 319 assertSame(map.computeIfAbsent(EXTRA_KEY, (k) -> EXTRA_VALUE), EXTRA_VALUE); in testComputeIfAbsent() 326 assertThrowsNPE(() -> map.computeIfAbsent(KEYS[1], null)); in testComputeIfAbsentNullFunction() 559 assertNull(map.computeIfAbsent(two, f)); in testConcurrentMap_computeIfAbsent_racy() 564 assertEquals(42L, (long)map.computeIfAbsent(two, f)); in testConcurrentMap_computeIfAbsent_racy() 569 assertEquals(99L, (long)map.computeIfAbsent(two, f)); in testConcurrentMap_computeIfAbsent_racy()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | DelegatingIteratorForEachRemaining.java | 145 …@Override public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { retu… in computeIfAbsent() method in DelegatingIteratorForEachRemaining.ForwardingMap
|
/libcore/ojluni/annotations/flagged_api/java/util/ |
D | HashMap.annotated.java | 74 public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)… in computeIfAbsent() method in HashMap
|
D | TreeMap.annotated.java | 67 public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)… in computeIfAbsent() method in TreeMap
|
D | Properties.annotated.java | 124 public synchronized java.lang.Object computeIfAbsent(java.lang.Object key, java.util.function.Funct… in computeIfAbsent() method in Properties
|
D | Map.annotated.java | 74 public default V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingF… in computeIfAbsent() method
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentMap.java | 325 default V computeIfAbsent(K key, in computeIfAbsent() method
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | SystemTest.java | 191 System.getProperties().computeIfAbsent("user.dir", (key) -> "meh"); in testSystemProperties_immutable()
|
/libcore/ojluni/annotations/mmodule/java/security/ |
D | Provider.annotated.java | 77 public synchronized java.lang.Object computeIfAbsent(java.lang.Object key, java.util.function.Funct… in computeIfAbsent() method in Provider
|
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/ |
D | ConcurrentSkipListMap.annotated.java | 70 public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)… in computeIfAbsent() method in ConcurrentSkipListMap
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | HashMap.annotated.java | 75 @libcore.util.Nullable public V computeIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore.uti… in computeIfAbsent() method in HashMap
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ConcurrentHashMap8Test.java | 94 map.computeIfAbsent(six, x -> "Z"); in testComputeIfAbsent() 103 assertEquals("A", map.computeIfAbsent(one, x -> "Z")); in testComputeIfAbsent2() 111 map.computeIfAbsent(six, x -> null); in testComputeIfAbsent3() 1139 result += map.computeIfAbsent(i % mapSize, k -> k + k); in testcomputeIfAbsent_performance()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Collectors.java | 1144 A container = m.computeIfAbsent(key, k -> downstreamSupplier.get()); 1307 A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get()); 1314 A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
|
/libcore/ojluni/src/main/java/java/security/ |
D | Provider.java | 546 …public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> … in computeIfAbsent() method in Provider 840 legacyStrings.computeIfAbsent((String) key, in implComputeIfAbsent() 843 return super.computeIfAbsent(key, mappingFunction); in implComputeIfAbsent()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | System.java | 957 public synchronized Object computeIfAbsent(Object key, in computeIfAbsent() method in System.PropertiesWithNonOverrideableDefaults 960 return super.computeIfAbsent(key, mappingFunction); in computeIfAbsent()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Properties.java | 1475 public synchronized Object computeIfAbsent(Object key, in computeIfAbsent() method in Properties 1477 return map.computeIfAbsent(key, mappingFunction); in computeIfAbsent()
|
D | LinkedHashMap.java | 1244 public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { in computeIfAbsent() method in LinkedHashMap.ReversedLinkedHashMapView 1245 return base.computeIfAbsent(key, mappingFunction); in computeIfAbsent()
|
D | Map.java | 1048 default V computeIfAbsent(K key, in computeIfAbsent() method
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMap8Test.java | 70 map.computeIfAbsent(six, (x) -> "Z"); in testComputeIfAbsent() 79 assertEquals("A", map.computeIfAbsent(one, (x) -> "Z")); in testComputeIfAbsent2() 87 map.computeIfAbsent(six, (x) -> null); in testComputeIfAbsent3()
|