Home
last modified time | relevance | path

Searched refs:getOrDefault (Results 1 – 15 of 15) 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.java481 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_unmodifiableMap_getOrDefault()
482 assertEquals(12.0, m.getOrDefault(2, -1.0)); in test_unmodifiableMap_getOrDefault()
483 assertEquals(null, m.getOrDefault(3, -1.0)); in test_unmodifiableMap_getOrDefault()
933 assertEquals(valuesInOrder.get(i), map.getOrDefault(keysInOrder.get(i), null)); in check_unmodifiableOrderedMap_defaultMethods()
1230 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_EmptyMap_getOrDefault()
1231 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_EmptyMap_getOrDefault()
1308 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_getOrDefault()
1309 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_SingletonMap_getOrDefault()
1315 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_forEach()
DLinkedHashMapTest.java50 m.getOrDefault("key1", "value"); in test_getOrDefault()
/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
DConcurrentHashMap.java1602 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in ConcurrentHashMap
/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
DCollections.java1540 public V getOrDefault(Object k, V defaultValue) {
1542 return ((Map<K, V>)m).getOrDefault(k, defaultValue);
2686 public V getOrDefault(Object k, V defaultValue) {
2687 synchronized (mutex) {return m.getOrDefault(k, defaultValue);}
4638 public V getOrDefault(Object k, V defaultValue) {
4950 public V getOrDefault(Object key, V defaultValue) {
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/luni/src/test/java/libcore/java/security/
DProviderTest.java1000 assertEquals("impl1", p.getOrDefault("class1.algorithm1", "default")); in test_getOrDefault()
1001 assertEquals("default", p.getOrDefault("thisIsNotInTheProvider", "default")); in test_getOrDefault()
/libcore/ojluni/src/main/java/java/security/
DProvider.java621 public synchronized Object getOrDefault(Object key, Object defaultValue) { in getOrDefault() method in Provider
623 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/luni/src/test/java/libcore/java/nio/file/
DFiles2Test.java1876 if (dirMap.getOrDefault(dir.getFileName(), VisitOption.UNVISITED) in postVisitDirectory()