Home
last modified time | relevance | path

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

/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java35 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_getOrDefault()
39 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_getOrDefault()
44 assertEquals(null, m.getOrDefault(1, -1.0)); in test_getOrDefault()
50 assertEquals(1.0, m.getOrDefault(null, -1.0)); in test_getOrDefault()
74 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
79 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
84 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_putIfAbsent()
88 assertNull(m.getOrDefault(1, -1.0)); in test_putIfAbsent()
101 assertEquals(1.0, m.getOrDefault(null, -1.0)); in test_putIfAbsent()
153 assertEquals(1.0, m.getOrDefault(1, -1.0)); in test_replace$K$V$V()
[all …]
DCollectionsTest.java219 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_unmodifiableMap_getOrDefault()
220 assertEquals(12.0, m.getOrDefault(2, -1.0)); in test_unmodifiableMap_getOrDefault()
221 assertEquals(null, m.getOrDefault(3, -1.0)); in test_unmodifiableMap_getOrDefault()
373 assertEquals(-1.0, m.getOrDefault(1, -1.0)); in test_EmptyMap_getOrDefault()
374 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_EmptyMap_getOrDefault()
451 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_getOrDefault()
452 assertEquals(-1.0, m.getOrDefault(2, -1.0)); in test_SingletonMap_getOrDefault()
458 assertEquals(11.0, m.getOrDefault(1, -1.0)); in test_SingletonMap_forEach()
DLinkedHashMapTest.java37 m.getOrDefault("key1", "value"); in test_getOrDefault()
/libcore/luni/src/main/java/java/util/concurrent/
DConcurrentMap.java59 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() method
DConcurrentSkipListMap.java1526 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in ConcurrentSkipListMap
DConcurrentHashMap.java1573 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in ConcurrentHashMap
/libcore/ojluni/src/main/java/java/util/
DMap.java588 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() method
DHashtable.java895 public synchronized V getOrDefault(Object key, V defaultValue) { in getOrDefault() method in Hashtable
896 return Map.super.getOrDefault(key, defaultValue); in getOrDefault()
DCollections.java1482 public V getOrDefault(Object k, V defaultValue) {
1484 return ((Map<K, V>)m).getOrDefault(k, defaultValue);
2372 public V getOrDefault(Object k, V defaultValue) {
2373 synchronized (mutex) {return m.getOrDefault(k, defaultValue);}
3788 public V getOrDefault(Object k, V defaultValue) {
4103 public V getOrDefault(Object key, V defaultValue) {
/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()