Home
last modified time | relevance | path

Searched refs:computeIfPresent (Results 1 – 25 of 37) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java345 assertNull(m.computeIfPresent(1, (k, v) -> 5.0 * k + v)); in test_computeIfPresent()
349 assertEquals(11.0, m.computeIfPresent(1, (k, v) -> 6.0 * k + v)); in test_computeIfPresent()
353 assertNull(m.computeIfPresent(1, (k, v) -> null)); in test_computeIfPresent()
358 m.computeIfPresent(1, null); in test_computeIfPresent()
364 assertEquals(1.0, m.computeIfPresent(null, (k, v) -> v)); in test_computeIfPresent()
367 m.computeIfPresent(null, (k, v) -> 5.0); in test_computeIfPresent()
DCollectionsTest.java560 Collections.unmodifiableMap(new HashMap<>()).computeIfPresent(1, (k, v) -> 1.0); in test_unmodifiableMap_computeIfPresent()
569 Collections.unmodifiableMap(m).computeIfPresent(1, (k, v) -> 1.0); in test_unmodifiableMap_computeIfPresent()
927 assertThrowsUoe(() -> { map.computeIfPresent(absentKey, (k, v) -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods()
939 assertThrowsUoe(() -> { map.computeIfPresent(sampleKey, (k, v) -> absentValue); }); in check_unmodifiableOrderedMap_defaultMethods()
1040 assertThrowsCce(() -> { map.computeIfPresent(new Object(), (k, v) -> presentValue); }); in check_map_isChecked()
1041 assertThrowsCce(() -> { map.computeIfPresent(presentKey, (k, v) -> new Object()); }); in check_map_isChecked()
1043 assertNull(map.computeIfPresent(absentKey, (k, v) -> new Object())); in check_map_isChecked()
1260 Collections.emptyMap().computeIfPresent(1, (k, v) -> 5.0); in test_EmptyMap_computeIfPresent()
1337 Collections.singletonMap(1, 11.0).computeIfPresent(1, (k, v) -> 5.0); in test_SingletonMap_computeIfPresent()
1593 checkedMap2.computeIfPresent(1, (k, v) -> NOT_A_STRING); in test_CheckedMap_computeIfPresent()
DLinkedHashMapTest.java174 m.computeIfPresent("key1", (k, v) -> "value3"); in test_computeIfPresent()
/libcore/ojluni/src/test/java/util/HashMap/
DOverrideIsEmpty.java73 map.computeIfPresent(key, new BiFunction<Object, Object, Object>() { in main()
/libcore/ojluni/src/test/java/util/Map/
DDefaults.java333 assertSame(map.computeIfPresent(null, (k, v) -> { in testComputeIfPresentNulls()
341 assertSame(map.computeIfPresent(EXTRA_KEY, (k, v) -> { in testComputeIfPresentNulls()
354 assertSame(map.computeIfPresent(KEYS[1], (k, v) -> { in testComputeIfPresent()
361 assertSame(map.computeIfPresent(EXTRA_KEY, (k, v) -> { in testComputeIfPresent()
371 assertThrowsNPE(() -> map.computeIfPresent(KEYS[1], null)); in testComputeIfPresentNullFunction()
588 assertNull(map.computeIfPresent(two, f)); in testConcurrentMap_computeIfPresent_racy()
598 assertNull(map.computeIfPresent(two, twoStep(b, f, g))); in testConcurrentMap_computeIfPresent_racy()
609 assertEquals(99L, (long)map.computeIfPresent(two, twoStep(b, f, g))); in testConcurrentMap_computeIfPresent_racy()
/libcore/ojluni/src/test/java/util/Collections/
DDelegatingIteratorForEachRemaining.java146 …rride public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunc… in computeIfPresent() method in DelegatingIteratorForEachRemaining.ForwardingMap
/libcore/ojluni/annotations/flagged_api/java/util/
DHashMap.annotated.java76 public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> rem… in computeIfPresent() method in HashMap
DTreeMap.annotated.java69 public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> rem… in computeIfPresent() method in TreeMap
DProperties.annotated.java126 public synchronized java.lang.Object computeIfPresent(java.lang.Object key, java.util.function.BiFu… in computeIfPresent() method in Properties
DMap.annotated.java76 public default V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extend… in computeIfPresent() method
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentMap.java367 default V computeIfPresent(K key, in computeIfPresent() method
/libcore/ojluni/annotations/mmodule/java/security/
DProvider.annotated.java79 public synchronized java.lang.Object computeIfPresent(java.lang.Object key, java.util.function.BiFu… in computeIfPresent() method in Provider
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/
DConcurrentSkipListMap.annotated.java72 public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> rem… in computeIfPresent() method in ConcurrentSkipListMap
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashMap.annotated.java77 @libcore.util.Nullable public V computeIfPresent(@libcore.util.NullFromTypeParam K key, @libcore.ut… in computeIfPresent() method in HashMap
DMap.annotated.java78 @libcore.util.Nullable public default V computeIfPresent(@libcore.util.NullFromTypeParam K key, @li… in computeIfPresent() method
/libcore/ojluni/src/main/java/java/security/
DProvider.java575 …public synchronized Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object,… in computeIfPresent() method in Provider
851 legacyStrings.computeIfPresent((String) key, in implComputeIfPresent()
854 return super.computeIfPresent(key, remappingFunction); in implComputeIfPresent()
/libcore/ojluni/src/main/java/java/lang/
DSystem.java968 public synchronized Object computeIfPresent(Object key, in computeIfPresent() method in System.PropertiesWithNonOverrideableDefaults
971 return super.computeIfPresent(key, remappingFunction); in computeIfPresent()
/libcore/ojluni/src/main/java/java/util/
DProperties.java1481 public synchronized Object computeIfPresent(Object key, in computeIfPresent() method in Properties
1483 return map.computeIfPresent(key, remappingFunction); in computeIfPresent()
DLinkedHashMap.java1248 …public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) { in computeIfPresent() method in LinkedHashMap.ReversedLinkedHashMapView
1249 return base.computeIfPresent(key, remappingFunction); in computeIfPresent()
DMap.java1125 default V computeIfPresent(K key, in computeIfPresent() method
DCollections.java1786 public V computeIfPresent(K key,
3047 public V computeIfPresent(K key,
3049 synchronized (mutex) {return m.computeIfPresent(key, remappingFunction);}
4101 public V computeIfPresent(K key,
4103 return m.computeIfPresent(key, typeCheck(remappingFunction));
5069 public V computeIfPresent(K key,
5397 public V computeIfPresent(K key,
/libcore/ojluni/src/test/java/util/LinkedHashMap/
DBasic.java221 Assert.assertTrue(x.equals(m.computeIfPresent(x, f))); in testBasic()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMap8Test.java96 map.computeIfPresent(six, (x, y) -> "Z"); in testComputeIfPresent()
105 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DConcurrentHashMap8Test.java120 map.computeIfPresent(six, (x, y) -> "Z"); in testComputeIfPresent()
129 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2()
/libcore/ojluni/annotations/hiddenapi/java/util/
DCollections.java841 public V computeIfPresent( in computeIfPresent() method in Collections.CheckedMap
1717 public V computeIfPresent( in computeIfPresent() method in Collections.EmptyMap
2097 public V computeIfPresent( in computeIfPresent() method in Collections.SingletonMap
2479 public V computeIfPresent( in computeIfPresent() method in Collections.SynchronizedMap
3138 public V computeIfPresent( in computeIfPresent() method in Collections.UnmodifiableMap

12