Home
last modified time | relevance | path

Searched refs:putIfAbsent (Results 1 – 25 of 30) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java73 assertNull(m.putIfAbsent(1, 1.0)); in test_putIfAbsent()
78 assertEquals(1.0, m.putIfAbsent(1, 2.0)); in test_putIfAbsent()
83 assertNull(m.putIfAbsent(1, 1.0)); in test_putIfAbsent()
87 assertNull(m.putIfAbsent(1, null)); in test_putIfAbsent()
92 m.putIfAbsent(1, null); in test_putIfAbsent()
100 assertEquals(1.0, m.putIfAbsent(null, 5.0)); in test_putIfAbsent()
104 m.putIfAbsent(null, 1.0); in test_putIfAbsent()
DLinkedHashMapTest.java56 m.putIfAbsent("key", "value"); in test_putIfAbsent()
57 m.putIfAbsent("key1", "value1"); in test_putIfAbsent()
58 m.putIfAbsent("key2", "value2"); in test_putIfAbsent()
67 m.putIfAbsent("key1", "value1"); in test_putIfAbsent()
DCollectionsTest.java237 Collections.unmodifiableMap(new HashMap<>()).putIfAbsent(1, 5.0); in test_unmodifiableMap_putIfAbsent()
246 Collections.unmodifiableMap(m).putIfAbsent(1, 5.0); in test_unmodifiableMap_putIfAbsent()
387 Collections.emptyMap().putIfAbsent(1, 5.0); in test_EmptyMap_putIfAbsent()
464 Collections.singletonMap(1, 11.0).putIfAbsent(1, 5.0); in test_SingletonMap_putIfAbsent()
629 checkedMap2.putIfAbsent(1, A_STRING); in test_CheckedMap_putIfAbsent()
631 checkedMap2.putIfAbsent(1, NOT_A_STRING); in test_CheckedMap_putIfAbsent()
637 checkedMap2.putIfAbsent(1, NOT_A_STRING); in test_CheckedMap_putIfAbsent()
/libcore/luni/src/main/java/java/util/concurrent/
DConcurrentMap.java130 V putIfAbsent(K key, V value); in putIfAbsent() method
304 && (oldValue = putIfAbsent(key, newValue)) == null) in computeIfAbsent()
400 else if ((oldValue = putIfAbsent(key, newValue)) == null) in compute()
466 if ((oldValue = putIfAbsent(key, value)) == null) in merge()
DConcurrentSkipListSet.java214 return m.putIfAbsent(e, Boolean.TRUE) == null; in add()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMapTest.java148 assertTrue(m.putIfAbsent(bis, true) == null); in testGenericComparable()
150 if (m.putIfAbsent(bss, true) == null) in testGenericComparable()
434 map.putIfAbsent(six, "Z"); in testPutIfAbsent()
443 assertEquals("A", map.putIfAbsent(one, "Z")); in testPutIfAbsent2()
672 c.putIfAbsent(null, "whatever"); in testPutIfAbsent1_NullPointerException()
705 c.putIfAbsent("whatever", null); in testPutIfAbsent2_NullPointerException()
DConcurrentSkipListSubMapTest.java282 map.putIfAbsent(six, "Z");
291 assertEquals("A", map.putIfAbsent(one, "Z"));
556 c.putIfAbsent(null, "whatever");
956 map.putIfAbsent(six, "Z");
965 assertEquals("A", map.putIfAbsent(m1, "Z"));
1230 c.putIfAbsent(null, "whatever");
DConcurrentSkipListMapTest.java370 map.putIfAbsent(six, "Z");
379 assertEquals("A", map.putIfAbsent(one, "Z"));
748 c.putIfAbsent(null, "whatever");
/libcore/ojluni/src/main/java/sun/util/calendar/
DCalendarSystem.java151 CalendarSystem cs = calendars.putIfAbsent(calendarName, cal); in forName()
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleObjectCache.java69 entry = map.putIfAbsent(key, newEntry); in get()
/libcore/ojluni/src/main/java/java/util/stream/
DDistinctOps.java86 map.putIfAbsent(t, Boolean.TRUE); in makeRef()
DStreamOpFlag.java414 map.putIfAbsent(t, 0b00); in build()
DStreamSpliterators.java1275 if (seen.putIfAbsent(mapNull(tmpSlot), Boolean.TRUE) == null) { in tryAdvance()
1287 if (seen.putIfAbsent(mapNull(t), Boolean.TRUE) == null) { in forEachRemaining()
/libcore/ojluni/src/main/java/sun/nio/ch/
DFileLockTable.java134 prev = lockMap.putIfAbsent(fileKey, list); in add()
/libcore/ojluni/src/main/java/java/util/
DMap.java743 default V putIfAbsent(K key, V value) { in putIfAbsent() method
DHashtable.java900 public synchronized V putIfAbsent(K key, V value) { in putIfAbsent() method in Hashtable
901 return Map.super.putIfAbsent(key, value); in putIfAbsent()
DCollections.java1498 public V putIfAbsent(K key, V value) {
2384 public V putIfAbsent(K key, V value) {
2385 synchronized (mutex) {return m.putIfAbsent(key, value);}
3114 public V putIfAbsent(K key, V value) {
3116 return m.putIfAbsent(key, value);
3803 public V putIfAbsent(K key, V value) {
4118 public V putIfAbsent(K key, V value) {
DCalendar.java2577 cachedLocaleData.putIfAbsent(desiredLocale, data); in setWeekCountData()
/libcore/ojluni/src/main/java/sun/util/
DLocaleServiceProviderPool.java114 pool = poolOfPools.putIfAbsent(providerClass, newPool); in getPool()
/libcore/ojluni/src/main/java/java/lang/
DThread.java1654 Caches.subclassAudits.putIfAbsent(key, result); in isCCLOverridden()
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java450 SoftReference<DateFormatSymbols> x = cachedInstances.putIfAbsent(locale, ref); in getCachedInstance()
DDecimalFormatSymbols.java653 cachedLocaleData.putIfAbsent(locale, data); in initialize()
DSimpleDateFormat.java634 cachedLocaleData.putIfAbsent(loc, dateTimePatterns); in SimpleDateFormat()
666 cachedNumberFormatData.putIfAbsent(loc, numberFormat); in initialize()
DDecimalFormat.java407 cachedLocaleData.putIfAbsent(def, pattern); in DecimalFormat()
/libcore/ojluni/src/main/java/java/io/
DObjectStreamClass.java325 ref = Caches.localDescs.putIfAbsent(key, newRef); in lookup()
2132 ref = Caches.reflectors.putIfAbsent(key, newRef); in getReflector()

12