Home
last modified time | relevance | path

Searched refs:singletonMap (Results 1 – 25 of 28) sorted by relevance

12

/libcore/ojluni/src/test/java/util/Collections/
DCheckedNull.java43 import static java.util.Collections.singletonMap;
128 m.putAll(singletonMap(k,v)); in put()
154 new F(){void f(){ m.putAll(singletonMap(1, "foo")); }}); in testMap()
164 new F(){void f(){ m.putAll(singletonMap("foo", 1)); }}, in testMap()
174 new F(){void f(){ m.putAll(singletonMap(3, 1)); }}); in testMap()
/libcore/luni/src/test/java/libcore/java/net/
DCookiesMCompatibilityTest.java38 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithoutLeadingPeriod()
55 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithLeadingPeriod()
DCookiesTest.java38 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithLeadingPeriod()
DAbstractCookiesTest.java774 return Collections.singletonMap("Set-Cookie", Arrays.asList(headers)); in cookieHeaders()
1541 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookieWithNoPeriod()
/libcore/ojluni/src/main/java/java/time/zone/
DIcuZoneRulesProvider.java67 Collections.singletonMap(TimeZone.getTZDataVersion(), in provideVersions()
/libcore/luni/src/test/java/libcore/java/util/
DCollectionsTest.java1283 Map<Integer, Double> m = Collections.singletonMap(1, 11.0); in test_SingletonMap_getOrDefault()
1290 Collections.singletonMap(1, 11.0).forEach(m::put); in test_SingletonMap_forEach()
1297 Collections.singletonMap(1, 11.0).putIfAbsent(1, 5.0); in test_SingletonMap_putIfAbsent()
1305 Collections.singletonMap(1, 11.0).remove(1, 5.0); in test_SingletonMap_remove()
1313 Collections.singletonMap(1, 11.0).replace(1, 5.0, 5.0); in test_SingletonMap_replace$K$V$V()
1321 Collections.singletonMap(1, 11.0).replace(1, 5.0); in test_SingletonMap_replace$K$V()
1329 Collections.singletonMap(1, 11.0).computeIfAbsent(1, k -> 5.0); in test_SingletonMap_computeIfAbsent()
1337 Collections.singletonMap(1, 11.0).computeIfPresent(1, (k, v) -> 5.0); in test_SingletonMap_computeIfPresent()
1345 Collections.singletonMap(1, 11.0).compute(1, (k, v) -> 5.0); in test_SingletonMap_compute()
1353 Collections.singletonMap(1, 11.0).merge(1, 5.0, (k, v) -> 5.0); in test_SingletonMap_merge()
DHashMapTest.java135 Map<String, Integer> m = new HashMap<>(Collections.singletonMap("key", 42)); in test_spliterator_entrySet()
DLocaleLanguageRangeTest.java161 Collections.singletonMap("en-US", Arrays.asList("en-US", "en-AU", "en-UK")))); in testMapEquivalents_emptyList()
DMapOfTest.java167 Map<K, V> exampleEntries = Collections.singletonMap(exampleKey, exampleValue); in assertUnmodifiable()
DLinkedHashMapTest.java460 Map<String, Integer> m = new LinkedHashMap<>(Collections.singletonMap("key", 23)); in test_spliterator_entrySet()
/libcore/ojluni/src/main/java/sun/util/locale/
DUnicodeLocaleExtension.java57 keywords = Collections.singletonMap(key, value); in UnicodeLocaleExtension()
DLocaleExtensions.java64 this.extensionMap = Collections.singletonMap(key, value); in LocaleExtensions()
/libcore/ojluni/src/test/java/util/Collection/
DMOAT.java143 testImmutableMap(unmodifiableMap(Collections.singletonMap(1,2))); in realMain()
150 testMapMutatorsAlwaysThrow(unmodifiableMap(Collections.singletonMap(1,2))); in realMain()
209 Map<Integer,Integer> singletonMap = singletonMap(1,2); in realMain() local
210 equal(singletonMap.size(), 1); in realMain()
211 testMap(singletonMap); in realMain()
212 testImmutableMap(singletonMap); in realMain()
613 () -> m.putAll(singletonMap(1,1))); in testImmutableMap()
1415 final Map<T,Integer> sm = singletonMap(null,1); in checkNPEConsistency()
1477 final Map singletonMap = new HashMap(); in testNavigableMapRemovers() local
1478 singletonMap.put(1, 2); in testNavigableMapRemovers()
[all …]
/libcore/luni/src/test/java/libcore/java/security/cert/
DPKIXRevocationCheckerTest.java68 .singletonMap((X509Certificate) entity.getCertificate(), goodOCSPResponse); in test_CanSetOCSPResponse()
DCertPathValidatorTest.java109 Collections.singletonMap(serverCert, ocspResponse.getEncoded())); in runOCSPStapledTest()
/libcore/ojluni/src/test/java/util/IdentityHashMap/
DCapacity.java109 map.putAll(Collections.singletonMap(new Object(), in growUsingRepeatedPutAll()
/libcore/luni/src/test/java/libcore/java/text/
DOldAttributedStringTest.java183 Map<AttributedCharacterIterator.Attribute, String> map = Collections.singletonMap( in test_ConstructorLjava_lang_StringLjava_util_Map()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCollectionsTest.java1986 Map single = Collections.singletonMap(key, value); in test_singletonMapLjava_lang_Object()
1992 assertFalse(Collections.singletonMap(null, null).containsKey(key)); in test_singletonMapLjava_lang_Object()
1993 assertFalse(Collections.singletonMap(null, null).containsValue(value)); in test_singletonMapLjava_lang_Object()
1994 assertTrue(Collections.singletonMap(null, null).containsKey(null)); in test_singletonMapLjava_lang_Object()
1995 assertTrue(Collections.singletonMap(null, null).containsValue(null)); in test_singletonMapLjava_lang_Object()
DCollections2Test.java542 testMapForEach(Collections.singletonMap("one", "1")); in test_Map_forEach()
/libcore/ojluni/annotations/flagged_api/java/util/
DCollections.annotated.java157 public static <K, V> java.util.Map<K,V> singletonMap(K key, V value) { throw new RuntimeException("… in singletonMap() method in Collections
/libcore/json/src/test/java/libcore/org/json/
DJSONArrayTest.java315 array.put(new JSONObject(Collections.singletonMap("x", 6))); in testJoin()
DJSONObjectTest.java671 JSONObject object = new JSONObject(Collections.singletonMap("foo", Double.NaN)); in testToStringWithUnsupportedNumbers()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DCollections.annotated.java150 …@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> singletonMap(@libcore.util.N… in singletonMap() method in Collections
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationStressTest4.java1101 objToSave = java.util.Collections.singletonMap("key", new Byte( in test_writeObject_Collections_SingletonMap()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java809 Map<TextStyle, Map<Long, String>> map = Collections.singletonMap(TextStyle.FULL, copy); in appendText()

12