/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | Collections2Test.java | 29 import java.util.Collections; 62 Collections.sort(lst, null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 63 int index = Collections.binarySearch(lst, new Integer(2), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 75 assertEquals(-1, Collections.binarySearch(localList, new Object())); in test_binarySearchLjava_util_ListLjava_lang_Object() 78 Collections.binarySearch(localList, new Integer(1)); in test_binarySearchLjava_util_ListLjava_lang_Object() 90 Collections.rotate(new ArrayList<Object>(), 25); in test_rotateLjava_util_ListI() 100 Collections.rotate(list, Integer.MIN_VALUE); in test_rotateLjava_util_ListI() 119 Collections.synchronizedCollection(null); in test_synchronizedCollectionLjava_util_Collection() 132 Collections.synchronizedSortedMap(null); in test_synchronizedSortedMapLjava_util_SortedMap() 145 Collections.synchronizedMap(null); in test_synchronizedMapLjava_util_Map() [all …]
|
D | CollectionsTest.java | 36 import java.util.Collections; 266 Collections.binarySearch(null, new Object()); in test_binarySearchLjava_util_ListLjava_lang_Object() 273 .get(i), ll.get(Collections.binarySearch(ll, ll in test_binarySearchLjava_util_ListLjava_lang_Object() 288 Collections.binarySearch(null, new Object(), comp); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 297 .get(Collections.binarySearch(myReversedLinkedList, in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 315 Collections.copy(null, ll); in test_copyLjava_util_ListLjava_util_List() 321 Collections.copy(ll, null); in test_copyLjava_util_ListLjava_util_List() 334 Collections.copy(al, ll); in test_copyLjava_util_ListLjava_util_List() 357 Collections.copy(ar2, ar1); in test_copyLjava_util_ListLjava_util_List() 372 Collections.copy(mal1, mal2); in test_copyLjava_util_ListLjava_util_List() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldCollectionsTest.java | 24 import java.util.Collections; 60 Collections.sort(lst, null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 61 int index = Collections.binarySearch(lst, new Integer(2), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 73 Collections.binarySearch(ll, new Integer(10), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator() 88 assertEquals(-1, Collections.binarySearch(localList, new Object())); in test_binarySearchLjava_util_ListLjava_lang_Object() 91 Collections.binarySearch(localList, new Integer(1)); in test_binarySearchLjava_util_ListLjava_lang_Object() 106 Collections.binarySearch(ll, new Integer(10)); in test_binarySearchLjava_util_ListLjava_lang_Object() 118 Collections.rotate(new ArrayList<Object>(), 25); in test_rotateLjava_util_ListI() 128 Collections.rotate(list, Integer.MIN_VALUE); in test_rotateLjava_util_ListI() 147 Collections.synchronizedCollection(null); in test_synchronizedCollectionLjava_util_Collection() [all …]
|
D | CollectionsTest.java | 24 import java.util.Collections; 57 import static java.util.Collections.checkedNavigableMap; 58 import static java.util.Collections.checkedQueue; 59 import static java.util.Collections.synchronizedNavigableMap; 60 import static java.util.Collections.unmodifiableNavigableMap; 76 Enumeration<Object> e = Collections.emptyEnumeration(); in testEmptyEnumeration() 87 testEmptyIterator(Collections.emptyIterator()); in testEmptyIterator() 88 testEmptyIterator(Collections.emptyList().iterator()); in testEmptyIterator() 89 testEmptyIterator(Collections.emptySet().iterator()); in testEmptyIterator() 90 testEmptyIterator(Collections.emptyMap().keySet().iterator()); in testEmptyIterator() [all …]
|
D | LocaleLanguageRangeTest.java | 23 import java.util.Collections; 158 List<LanguageRange> noRange = Collections.emptyList(); in testMapEquivalents_emptyList() 159 assertEquals(noRange, LanguageRange.mapEquivalents(noRange, Collections.emptyMap())); in testMapEquivalents_emptyList() 161 Collections.singletonMap("en-US", Arrays.asList("en-US", "en-AU", "en-UK")))); in testMapEquivalents_emptyList() 165 List<LanguageRange> inputRanges = Collections.unmodifiableList(Arrays.asList( in testMapEquivalents_emptyMap_createsModifiableCopy() 169 LanguageRange.mapEquivalents(inputRanges, Collections.emptyMap()); in testMapEquivalents_emptyMap_createsModifiableCopy() 182 map.put("zh", Collections.unmodifiableList(Arrays.asList("zh", "zh-Hans"))); in testMapEquivalents_exampleFromDocumentation() 183 map.put("zh-HK", Collections.singletonList("zh-HK")); in testMapEquivalents_exampleFromDocumentation() 184 map.put("zh-TW", Collections.singletonList("zh-TW")); in testMapEquivalents_exampleFromDocumentation() 209 LanguageRange.mapEquivalents(null, Collections.emptyMap()); in testMapEquivalents_nullList() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | SliceOpTest.java | 66 exerciseOps(Collections.emptyList(), s -> s.skip(0), Collections.emptyList()); in testSkip() 67 exerciseOps(Collections.emptyList(), s -> s.skip(10), Collections.emptyList()); in testSkip() 70 exerciseOps(countTo(1), s -> s.skip(1), Collections.emptyList()); in testSkip() 73 exerciseOps(countTo(100), s -> s.skip(100), Collections.emptyList()); in testSkip() 74 exerciseOps(countTo(100), s -> s.skip(200), Collections.emptyList()); in testSkip() 88 exerciseOps(Collections.emptyList(), s -> s.limit(0), Collections.emptyList()); in testLimit() 89 exerciseOps(Collections.emptyList(), s -> s.limit(10), Collections.emptyList()); in testLimit() 90 exerciseOps(countTo(1), s -> s.limit(0), Collections.emptyList()); in testLimit() 92 exerciseOps(countTo(100), s -> s.limit(0), Collections.emptyList()); in testLimit() 101 exerciseOps(Collections.emptyList(), s -> s.skip(0).limit(0), Collections.emptyList()); in testSkipLimit() [all …]
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | UnicodeLocaleExtension.java | 35 import java.util.Collections; 55 attributes = Collections.emptySet(); in UnicodeLocaleExtension() 56 keywords = Collections.singletonMap(key, value); in UnicodeLocaleExtension() 64 this.attributes = Collections.emptySet(); in UnicodeLocaleExtension() 69 this.keywords = Collections.emptyMap(); in UnicodeLocaleExtension() 91 if (attributes == Collections.EMPTY_SET) { in getUnicodeLocaleAttributes() 94 return Collections.unmodifiableSet(attributes); in getUnicodeLocaleAttributes() 98 if (keywords == Collections.EMPTY_MAP) { in getUnicodeLocaleKeys() 99 return Collections.emptySet(); in getUnicodeLocaleKeys() 101 return Collections.unmodifiableSet(keywords.keySet()); in getUnicodeLocaleKeys()
|
D | LocaleExtensions.java | 34 import java.util.Collections; 64 this.extensionMap = Collections.singletonMap(key, value); in LocaleExtensions() 79 extensionMap = Collections.emptyMap(); in LocaleExtensions() 129 extensionMap = Collections.emptyMap(); in LocaleExtensions() 138 return Collections.emptySet(); in getKeys() 140 return Collections.unmodifiableSet(extensionMap.keySet()); in getKeys() 158 return Collections.emptySet(); in getUnicodeLocaleAttributes() 167 return Collections.emptySet(); in getUnicodeLocaleKeys()
|
/libcore/ojluni/src/main/java/java/security/cert/ |
D | PKIXRevocationChecker.java | 29 import java.util.Collections; 101 private List<Extension> ocspExtensions = Collections.<Extension>emptyList(); 102 private Map<X509Certificate, byte[]> ocspResponses = Collections.emptyMap(); 103 private Set<Option> options = Collections.emptySet(); 171 ? Collections.<Extension>emptyList() in setOcspExtensions() 182 return Collections.unmodifiableList(ocspExtensions); in getOcspExtensions() 197 this.ocspResponses = Collections.<X509Certificate, byte[]>emptyMap(); in setOcspResponses() 233 ? Collections.<Option>emptySet() in setOptions() 244 return Collections.unmodifiableSet(options); in getOptions()
|
D | PKIXParameters.java | 32 import java.util.Collections; 122 this.unmodInitialPolicies = Collections.<String>emptySet(); in PKIXParameters() 158 this.unmodInitialPolicies = Collections.<String>emptySet(); in PKIXParameters() 209 this.unmodTrustAnchors = Collections.unmodifiableSet in setTrustAnchors() 259 Collections.unmodifiableSet(new HashSet<String>(initialPolicies)); in setInitialPolicies() 261 this.unmodInitialPolicies = Collections.<String>emptySet(); in setInitialPolicies() 318 return Collections.unmodifiableList in getCertStores() 574 return Collections.unmodifiableList(tmpList); in getCertPathCheckers()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | CookiesMCompatibilityTest.java | 24 import java.util.Collections; 38 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithoutLeadingPeriod() 39 Collections.singletonList("a=b; domain=chargepoint.com")); in testCookiesWithoutLeadingPeriod() 55 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithLeadingPeriod() 56 Collections.singletonList("b=c; domain=.chargepoint.com;")); in testCookiesWithLeadingPeriod() 63 assertEquals(Collections.singletonList("b=c"), cookieList); in testCookiesWithLeadingPeriod()
|
D | CookiesTest.java | 24 import java.util.Collections; 38 Map<String, List<String>> responseHeaders = Collections.singletonMap("Set-Cookie", in testCookiesWithLeadingPeriod() 39 Collections.singletonList("foo=bar")); in testCookiesWithLeadingPeriod() 49 assertEquals(Collections.singletonList("foo=bar"), cookieList); in testCookiesWithLeadingPeriod()
|
D | NetworkInterfaceTest.java | 32 import java.util.Collections; 55 Set<InetAddress> actual = new HashSet<InetAddress>(Collections.list(lo.getInetAddresses())); in testIPv6() 95 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testInterfaceProperties() 124 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testDumpAll() 226 Collections.list(nifs).forEach(ni -> actualNiNames.add(ni.getName())); in testGetNetworkInterfaces() 234 List<NetworkInterface> nifs = Collections.list(NetworkInterface.getNetworkInterfaces()); in testGetSubInterfaces() 243 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testIsUp() 252 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testIsLoopback() 258 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testIsPointToPoint() 264 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testSupportsMulticast()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | CollectionsBenchmark.java | 21 import java.util.Collections; 44 Collections.sort(input); in timeSort_arrayList() 51 Collections.sort(input, REVERSE); in timeSortWithComparator_arrayList() 58 Collections.sort(input); in timeSort_vector() 65 Collections.sort(input, REVERSE); in timeSortWithComparator_vector()
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SSLParameters.java | 34 import java.util.Collections; 308 sniNames = Collections.<Integer, SNIServerName>emptyMap(); in setServerNames() 356 return Collections.<SNIServerName>unmodifiableList( in getServerNames() 359 return Collections.<SNIServerName>emptyList(); in getServerNames() 403 sniMatchers = Collections.<Integer, SNIMatcher>emptyMap(); in setSNIMatchers() 431 return Collections.<SNIMatcher>unmodifiableList( in getSNIMatchers() 434 return Collections.<SNIMatcher>emptyList(); in getSNIMatchers()
|
D | KeyStoreBuilderParameters.java | 54 parameters = Collections.singletonList(Objects.requireNonNull(builder)); in KeyStoreBuilderParameters() 71 this.parameters = Collections.unmodifiableList( in KeyStoreBuilderParameters()
|
/libcore/luni/src/test/java/libcore/java/time/zone/ |
D | ZoneRulesTest.java | 25 import java.util.Collections; 42 assertEquals(Collections.emptyList(), zoneRules.getTransitionRules()); in test_of_ZoneOffset() 43 assertEquals(Collections.emptyList(), zoneRules.getTransitions()); in test_of_ZoneOffset() 61 assertEquals(Collections.singletonList(offset), in test_of_ZoneOffset()
|
/libcore/tools/upstream/src/main/java/libcore/ |
D | Lines.java | 22 import java.util.Collections; 31 public static Lines EMPTY = new Lines(Collections.emptyList()); 58 return Collections.unmodifiableList(delegate).iterator(); in iterator()
|
D | StandardRepositories.java | 23 import java.util.Collections; 51 this.allUpstreams = Collections.unmodifiableList(new ArrayList<>(allUpstreams)); in StandardRepositories() 52 this.historicUpstreams = Collections.unmodifiableList(new ArrayList<>( in StandardRepositories() 92 private static final Set<String> juFilesFromJsr166 = Collections.unmodifiableSet(
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | PrincipalTest.java | 22 import java.util.Collections; 40 Collections.EMPTY_SET /* pubCredentials */, in test_Principal_implies() 41 Collections.EMPTY_SET /* privCredentials */); in test_Principal_implies()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/ |
D | NamespaceSupportTest.java | 20 import java.util.Collections; 163 prefixes = Collections.list(ns.getPrefixes(marketUri)); in testGetPrefixesLjava_lang_String() 167 prefixes = Collections.list(ns.getPrefixes(defaultUri)); in testGetPrefixesLjava_lang_String() 171 prefixes = Collections.list(ns.getPrefixes(NamespaceSupport.XMLNS)); in testGetPrefixesLjava_lang_String() 175 prefixes = Collections.list(ns.getPrefixes(defaultUri + "/42")); in testGetPrefixesLjava_lang_String() 186 prefixes = Collections.list(ns.getPrefixes()); in testGetPrefixes() 197 prefixes = Collections.list(ns.getDeclaredPrefixes()); in testGetDeclaredPrefixes() 315 ArrayList<String> prefixes = Collections.list(ns.getPrefixes()); in countPrefixes()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Collector.java | 27 import java.util.Collections; 270 … : Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.IDENTITY_FINISH, in of() 304 Collections.addAll(cs, characteristics); in of() 305 cs = Collections.unmodifiableSet(cs); in of()
|
/libcore/luni/src/main/java/libcore/timezone/ |
D | CountryZonesFinder.java | 20 import java.util.Collections; 52 return Collections.unmodifiableList(isoCodes); in lookupAllCountryIsoCodes() 70 return Collections.unmodifiableList(matches); in lookupCountryTimeZonesForZoneId()
|
/libcore/luni/src/test/java/libcore/java/security/cert/ |
D | PKIXRevocationCheckerTest.java | 14 import java.util.Collections; 72 Map<X509Certificate, byte[]> ocspResponses = Collections in test_CanSetOCSPResponse() 95 checker.setOptions(Collections.singleton(Option.SOFT_FAIL)); in test_getOptions() 96 assertEquals(Collections.singleton(Option.SOFT_FAIL), checker.getOptions()); in test_getOptions() 100 checker.setOcspExtensions(Collections.singletonList(new Extension() { in test_getOcspExtensions()
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/cert/ |
D | MyCertPath.java | 28 import java.util.Collections; 72 return Collections.unmodifiableList(certificates); in getCertificates() 105 return Collections.unmodifiableCollection(encodingNames).iterator(); in getEncodings()
|