Home
last modified time | relevance | path

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

/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java71 assertSame("default", m.getOrDefault(new Object(), "default")); in test_getOrDefault()
101 V actual = map.getOrDefault(key, defaultValue); in checkGetOrDefault()
111 return new HashMap<>(map).getOrDefault(key, defaultValue); in getOrDefault_hashMap()
155 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
160 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
165 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
169 assertNull(m.getOrDefault(1, -1.0)); in test_putIfAbsent()
182 assertEquals(1.0, m.getOrDefault(null, -1.0)); in test_putIfAbsent()
234 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_replace$K$V$V()
239 assertEquals(2.0, m.getOrDefault(1, -1.0)); in test_replace$K$V$V()
[all …]
DCollectionsTest.java455 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_unmodifiableMap_getOrDefault()
456 assertEquals(12.0, m.getOrDefault(2, -1.0)); in test_unmodifiableMap_getOrDefault()
457 assertEquals(null, m.getOrDefault(3, -1.0)); in test_unmodifiableMap_getOrDefault()
907 assertEquals(valuesInOrder.get(i), map.getOrDefault(keysInOrder.get(i), null)); in check_unmodifiableOrderedMap_defaultMethods()
1204 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_EmptyMap_getOrDefault()
1205 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_EmptyMap_getOrDefault()
1282 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_getOrDefault()
1283 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_SingletonMap_getOrDefault()
1289 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_forEach()
DLinkedHashMapTest.java50 m.getOrDefault("key1", "value"); in test_getOrDefault()
/libcore/ojluni/annotations/mmodule/java/util/
DLinkedHashMap.annotated.java47 public V getOrDefault(java.lang.Object key, V defaultValue) { throw new RuntimeException("Stub!"); } in getOrDefault() method in LinkedHashMap
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentMap.java88 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() method
DConcurrentSkipListMap.java1555 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in ConcurrentSkipListMap
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashMap.annotated.java65 @libcore.util.Nullable public V getOrDefault(@libcore.util.Nullable java.lang.Object key, @libcore.… in getOrDefault() method in HashMap
DMap.annotated.java62 @libcore.util.Nullable public default V getOrDefault(@libcore.util.Nullable java.lang.Object key, @… in getOrDefault() method
/libcore/ojluni/annotations/mmodule/java/security/
DProvider.annotated.java85 public synchronized java.lang.Object getOrDefault(java.lang.Object key, java.lang.Object defaultVal… in getOrDefault() method in Provider
/libcore/ojluni/src/main/java/java/util/
DMap.java586 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() method
DLinkedHashMap.java474 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in LinkedHashMap
DHashtable.java865 public synchronized V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in Hashtable
DHashMap.java1057 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in HashMap
/libcore/ojluni/annotations/hiddenapi/java/util/
DLinkedHashMap.java110 public V getOrDefault(java.lang.Object key, V defaultValue) { in getOrDefault() method in LinkedHashMap
DHashMap.java143 public V getOrDefault(java.lang.Object key, V defaultValue) { in getOrDefault() method in HashMap
/libcore/luni/src/test/java/libcore/java/security/
DProviderTest.java1072 assertEquals("impl1", p.getOrDefault("class1.algorithm1", "default")); in test_getOrDefault()
1073 assertEquals("default", p.getOrDefault("thisIsNotInTheProvider", "default")); in test_getOrDefault()
/libcore/ojluni/src/main/java/java/security/
DProvider.java625 public synchronized Object getOrDefault(Object key, Object defaultValue) { in getOrDefault() method in Provider
627 return super.getOrDefault(key, defaultValue); in getOrDefault()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMap8Test.java61 assertEquals(map.getOrDefault(one, "Z"), "A"); in testGetOrDefault()
62 assertEquals(map.getOrDefault(six, "Z"), "Z"); in testGetOrDefault()
/libcore/ojluni/annotations/sdk/nullability/java/util/concurrent/
DConcurrentHashMap.annotated.java102 …@libcore.util.Nullable public V getOrDefault(@libcore.util.NonNull java.lang.Object key, @libcore.… in getOrDefault() method in ConcurrentHashMap
/libcore/luni/src/test/java/libcore/java/nio/file/
DFiles2Test.java1876 if (dirMap.getOrDefault(dir.getFileName(), VisitOption.UNVISITED) in postVisitDirectory()