/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentMap.java | 157 V putIfAbsent(K key, V value); in putIfAbsent() method 331 && (oldValue = putIfAbsent(key, newValue)) == null) in computeIfAbsent() 427 else if ((oldValue = putIfAbsent(key, newValue)) == null) in compute() 493 if ((oldValue = putIfAbsent(key, value)) == null) in merge()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | MapDefaultMethodTester.java | 154 assertNull(m.putIfAbsent(1, 1.0)); in test_putIfAbsent() 159 assertEquals(1.0, m.putIfAbsent(1, 2.0)); in test_putIfAbsent() 164 assertNull(m.putIfAbsent(1, 1.0)); in test_putIfAbsent() 168 assertNull(m.putIfAbsent(1, null)); in test_putIfAbsent() 173 m.putIfAbsent(1, null); in test_putIfAbsent() 181 assertEquals(1.0, m.putIfAbsent(null, 5.0)); in test_putIfAbsent() 185 m.putIfAbsent(null, 1.0); in test_putIfAbsent()
|
D | CollectionsTest.java | 475 Collections.unmodifiableMap(new HashMap<>()).putIfAbsent(1, 5.0); in test_unmodifiableMap_putIfAbsent() 484 Collections.unmodifiableMap(m).putIfAbsent(1, 5.0); in test_unmodifiableMap_putIfAbsent() 922 assertThrowsUoe(() -> { map.putIfAbsent(absentKey, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 934 assertThrowsUoe(() -> { map.putIfAbsent(sampleKey, absentValue); }); in check_unmodifiableOrderedMap_defaultMethods() 1021 assertThrowsCce(() -> { map.putIfAbsent(presentKey, new Object()); }); in check_map_isChecked() 1022 assertThrowsCce(() -> { map.putIfAbsent(absentKey, new Object()); }); in check_map_isChecked() 1023 assertThrowsCce(() -> { map.putIfAbsent(new Object(), presentValue); }); in check_map_isChecked() 1220 Collections.emptyMap().putIfAbsent(1, 5.0); in test_EmptyMap_putIfAbsent() 1297 Collections.singletonMap(1, 11.0).putIfAbsent(1, 5.0); in test_SingletonMap_putIfAbsent() 1506 checkedMap2.putIfAbsent(1, A_STRING); in test_CheckedMap_putIfAbsent() [all …]
|
D | LinkedHashMapTest.java | 69 m.putIfAbsent("key", "value"); in test_putIfAbsent() 70 m.putIfAbsent("key1", "value1"); in test_putIfAbsent() 71 m.putIfAbsent("key2", "value2"); in test_putIfAbsent() 80 m.putIfAbsent("key1", "value1"); in test_putIfAbsent()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMapTest.java | 148 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()
|
D | ConcurrentSkipListSubMapTest.java | 282 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");
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ConcurrentHashMapTest.java | 173 assertTrue(m.putIfAbsent(bis, true) == null); in testGenericComparable() 175 if (m.putIfAbsent(bss, true) == null) in testGenericComparable() 474 map.putIfAbsent(six, "Z"); in testPutIfAbsent() 483 assertEquals("A", map.putIfAbsent(one, "Z")); in testPutIfAbsent2() 712 c.putIfAbsent(null, "whatever"); in testPutIfAbsent1_NullPointerException() 745 c.putIfAbsent("whatever", null); in testPutIfAbsent2_NullPointerException()
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | WeakCache.java | 111 = map.putIfAbsent(cacheKey, in get() 142 supplier = valuesMap.putIfAbsent(subKey, factory); in get()
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleObjectCache.java | 68 entry = map.putIfAbsent(key, newEntry); in get()
|
/libcore/ojluni/src/test/java/util/Properties/ |
D | CheckOverrides.java | 54 .forEach(m -> unoverriddenMethods.putIfAbsent(new MethodSignature(m), m)); in main()
|
/libcore/ojluni/src/test/java/util/Map/ |
D | Defaults.java | 94 assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null"); in testPutIfAbsentNulls() 98 assertSame(map.putIfAbsent(null, null), EXTRA_VALUE, "previous not expected value"); in testPutIfAbsentNulls() 105 assertNull(map.putIfAbsent(null, null), "previous not null"); in testPutIfAbsentNulls() 109 assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null"); in testPutIfAbsentNulls() 119 assertSame(map.putIfAbsent(KEYS[1], EXTRA_VALUE), expected); in testPutIfAbsent() 124 assertSame(map.putIfAbsent(EXTRA_KEY, EXTRA_VALUE), null); in testPutIfAbsent() 126 assertSame(map.putIfAbsent(EXTRA_KEY, VALUES[2]), EXTRA_VALUE); in testPutIfAbsent() 1047 @Override public V putIfAbsent(K k, V v) { 1048 return map.putIfAbsent(requireNonNull(k), requireNonNull(v));
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | CalendarSystem.java | 218 CalendarSystem cs = calendars.putIfAbsent(calendarName, cal); in forName()
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneRulesProvider.java | 322 ZoneRulesProvider old = ZONES.putIfAbsent(zoneId, provider); in registerProvider0()
|
/libcore/ojluni/src/main/java/java/time/ |
D | ZoneOffset.java | 417 SECONDS_CACHE.putIfAbsent(totalSecs, result); in ofTotalSeconds() 419 ID_CACHE.putIfAbsent(result.getId(), result); in ofTotalSeconds()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | DelegatingIteratorForEachRemaining.java | 141 @Override public V putIfAbsent(K key, V value) { return delegate.putIfAbsent(key, value); } in putIfAbsent() method in DelegatingIteratorForEachRemaining.ForwardingMap
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DisabledAlgorithmConstraints.java | 264 constraintsMap.putIfAbsent( in Constraints() 306 constraintsMap.putIfAbsent(algorithm, in Constraints()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DecimalStyle.java | 164 CACHE.putIfAbsent(locale, info); in of()
|
/libcore/ojluni/annotations/flagged_api/java/util/ |
D | HashMap.annotated.java | 66 public V putIfAbsent(K key, V value) { throw new RuntimeException("Stub!"); } in putIfAbsent() method in HashMap
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DecimalFormatData.java | 107 DecimalFormatData prev = CACHE.putIfAbsent(languageTag, data); in getInstance()
|
D | SimpleDateFormatData.java | 110 SimpleDateFormatData prev = CACHE.putIfAbsent(languageTag, data); in getInstance()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | DistinctOps.java | 87 map.putIfAbsent(t, Boolean.TRUE); in makeRef()
|
D | StreamOpFlag.java | 427 map.putIfAbsent(t, 0b00); in build()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Currency.java | 322 instance = instances.putIfAbsent(currencyCode, currencyVal); in getInstance()
|
/libcore/ojluni/src/test/java/lang/StackWalker/ |
D | AcrossThreads.java | 98 Integer i = methods.putIfAbsent(f.getMethodName(), 1); in assertWalker()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | FileLockTable.java | 134 prev = lockMap.putIfAbsent(fileKey, list); in add()
|