Home
last modified time | relevance | path

Searched refs:computeIfAbsent (Results 1 – 20 of 20) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java303 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()
DCollectionsTest.java541 Collections.unmodifiableMap(new HashMap<>()).computeIfAbsent(1, k -> 1.0); in test_unmodifiableMap_computeIfAbsent()
550 Collections.unmodifiableMap(m).computeIfAbsent(1, k -> 1.0); in test_unmodifiableMap_computeIfAbsent()
924 assertThrowsUoe(() -> { map.computeIfAbsent(absentKey, k -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods()
936 assertThrowsUoe(() -> { map.computeIfAbsent(sampleKey, k -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods()
1033 assertThrowsCce(() -> { map.computeIfAbsent(new Object(), k -> presentValue); }); in check_map_isChecked()
1035 assertEquals(presentValue, map.computeIfAbsent(presentKey, k -> new Object())); in check_map_isChecked()
1036 assertThrowsCce(() -> { map.computeIfAbsent(absentKey, k -> new Object()); }); in check_map_isChecked()
1250 Collections.emptyMap().computeIfAbsent(1, k -> 5.0); in test_EmptyMap_computeIfAbsent()
1327 Collections.singletonMap(1, 11.0).computeIfAbsent(1, k -> 5.0); in test_SingletonMap_computeIfAbsent()
1568 assertSame(A_STRING, checkedMap2.computeIfAbsent(1, k -> { in test_CheckedMap_computeIfAbsent()
[all …]
DLinkedHashMapTest.java148 m.computeIfAbsent("key1", (k) -> "value3"); in test_computeIfAbsent()
157 m.computeIfAbsent("key4", (k) -> "value3"); in test_computeIfAbsent()
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentMap.java327 default V computeIfAbsent(K key, in computeIfAbsent() method
DConcurrentSkipListMap.java1671 public V computeIfAbsent(K key, in computeIfAbsent() method in ConcurrentSkipListMap
DConcurrentHashMap.java1699 public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { in computeIfAbsent() method in ConcurrentHashMap
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashMap.annotated.java75 @libcore.util.Nullable public V computeIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore.uti… in computeIfAbsent() method in HashMap
DMap.annotated.java76 @libcore.util.Nullable public default V computeIfAbsent(@libcore.util.NullFromTypeParam K key, @lib… in computeIfAbsent() method
/libcore/ojluni/annotations/mmodule/java/security/
DProvider.annotated.java77 public synchronized java.lang.Object computeIfAbsent(java.lang.Object key, java.util.function.Funct… in computeIfAbsent() method in Provider
/libcore/ojluni/src/main/java/java/util/stream/
DCollectors.java908 A container = m.computeIfAbsent(key, k -> downstreamSupplier.get());
1064 A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
1071 A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
/libcore/ojluni/src/main/java/java/util/
DMap.java966 default V computeIfAbsent(K key, in computeIfAbsent() method
DCollections.java1581 public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
2721 public V computeIfAbsent(K key,
2723 synchronized (mutex) {return m.computeIfAbsent(key, mappingFunction);}
3741 public V computeIfAbsent(K key,
3744 return m.computeIfAbsent(key, k -> {
4684 public V computeIfAbsent(K key,
4996 public V computeIfAbsent(K key,
DHashtable.java1001 public synchronized V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { in computeIfAbsent() method in Hashtable
DHashMap.java1097 public V computeIfAbsent(K key, in computeIfAbsent() method in HashMap
/libcore/ojluni/src/main/java/java/security/
DProvider.java544 …public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> … in computeIfAbsent() method in Provider
838 legacyStrings.computeIfAbsent((String) key, in implComputeIfAbsent()
841 return super.computeIfAbsent(key, mappingFunction); in implComputeIfAbsent()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMap8Test.java70 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()
/libcore/ojluni/annotations/hiddenapi/java/util/
DCollections.java836 public V computeIfAbsent( in computeIfAbsent() method in Collections.CheckedMap
1712 public V computeIfAbsent( in computeIfAbsent() method in Collections.EmptyMap
2092 public V computeIfAbsent( in computeIfAbsent() method in Collections.SingletonMap
2474 public V computeIfAbsent( in computeIfAbsent() method in Collections.SynchronizedMap
3133 public V computeIfAbsent( in computeIfAbsent() method in Collections.UnmodifiableMap
DHashMap.java163 public V computeIfAbsent( in computeIfAbsent() method in HashMap
/libcore/ojluni/annotations/sdk/nullability/java/util/concurrent/
DConcurrentHashMap.annotated.java108 …@libcore.util.Nullable public V computeIfAbsent(@libcore.util.NonNull K key, @libcore.util.NonNull… in computeIfAbsent() method in ConcurrentHashMap
/libcore/luni/src/test/java/libcore/java/security/
DProviderTest.java1130 provAndParam -> provAndParam.provider.computeIfAbsent(