Searched refs:list (Results 1 - 25 of 176) sorted by relevance

12345678

/libcore/luni/src/test/java/libcore/java/util/
H A DArraysTest.java28 int[] list = new int[3];
29 list[0] = 0;
30 list[1] = 1;
31 list[2] = 2;
33 Arrays.setAll(list, x -> x + 1);
34 assertEquals(1, list[0]);
35 assertEquals(2, list[1]);
36 assertEquals(3, list[2]);
39 Arrays.setAll(list, null);
55 int[] list
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DEventLogger.java47 public void report (int code, Object... list); argument
55 public void report (int code, Object... list) { argument
58 for (Object o : list) {
66 public static void writeEvent(int code, Object... list) { argument
67 getReporter().report(code, list);
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DFileLockTable.java66 * @return The list of file locks removed
85 * SharedFileLockTable uses a list of file lock references to avoid keeping the
104 // The map value is a list of file locks represented by FileLockReferences.
105 // All access to the list must be synchronized on the list.
125 List<FileLockReference> list = lockMap.get(fileKey);
130 if (list == null) {
131 list = new ArrayList<FileLockReference>(2);
133 synchronized (list) {
134 prev = lockMap.putIfAbsent(fileKey, list);
165 removeKeyIfEmpty(FileKey fk, List<FileLockReference> list) argument
248 checkList(List<FileLockReference> list, long position, long size) argument
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_ListTest.java27 List<Integer> list; // must contain the Integers 0 to 99 in order field in class:Support_ListTest
35 list = l;
43 elem = list.get(counter);
48 assertTrue("ListTest - hashCode failed", hashCode == list.hashCode());
50 list.add(50, new Integer(1000));
51 assertTrue("ListTest - a) add with index failed--did not insert", list
55 list.get(51).equals(new Integer(50)));
58 list.get(49).equals(new Integer(49)));
60 list.set(50, new Integer(2000));
61 assertTrue("ListTest - a) set failed--did not set", list
128 t_listIterator(List<Integer> list) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/jca/
H A DProviders.java38 * Collection of methods to get and set provider list. Also includes
39 * special code for the provider list during JAR verification.
53 // current system-wide provider list
62 // set providerList to empty list first in case initialization somehow
141 * Start JAR verification. This sets a special provider list for
149 // return the old thread-local provider list, usually null
157 // restore old thread-local provider list
162 * Return the current ProviderList. If the thread-local list is set,
163 * it is returned. Otherwise, the system wide list is returned.
166 ProviderList list
216 setSystemProviderList(ProviderList list) argument
232 changeThreadProviderList(ProviderList list) argument
252 beginThreadProviderList(ProviderList list) argument
262 endThreadProviderList(ProviderList list) argument
[all...]
/libcore/luni/src/test/java/libcore/libcore/util/
H A DCollectionUtilsTest.java78 List<String> list = new ArrayList<String>();
79 CollectionUtils.removeDuplicates(list, String.CASE_INSENSITIVE_ORDER);
80 assertTrue(list.isEmpty());
84 List<String> list = Arrays.asList("A");
85 CollectionUtils.removeDuplicates(list, String.CASE_INSENSITIVE_ORDER);
86 assertEquals(Collections.singletonList("A"), list);
90 List<String> list = new ArrayList<String>();
91 list.add("A");
92 list.add("A");
93 list
[all...]
H A DCountryZonesFinderTest.java51 CountryZonesFinder.createForTests(list(GB_ZONES, FR_ZONES));
54 assertEqualsAndImmutable(list(GB_ZONES.getCountryIso(), FR_ZONES.getCountryIso()), isoList);
59 CountryZonesFinder countryZonesFinder = CountryZonesFinder.createForTests(list());
61 assertEqualsAndImmutable(list(), isoList);
67 CountryZonesFinder.createForTests(list(GB_ZONES, IM_ZONES, FR_ZONES, US_ZONES));
69 assertEqualsAndImmutable(list(GB_ZONES, IM_ZONES),
71 assertEqualsAndImmutable(list(US_ZONES),
73 assertEqualsAndImmutable(list(US_ZONES),
75 assertEqualsAndImmutable(list(),
82 CountryZonesFinder.createForTests(list(GB_ZONE
93 assertImmutableList(List<X> list) argument
101 private static <X> List<X> list(X... values) { method in class:CountryZonesFinderTest
[all...]
/libcore/ojluni/src/main/java/java/lang/ref/
H A DReferenceQueue.java213 * Enqueue the given list of currently pending (unenqueued) references.
217 public static void enqueuePending(Reference<?> list) { argument
218 Reference<?> start = list;
220 ReferenceQueue queue = list.queue;
222 Reference<?> next = list.pendingNext;
227 list.pendingNext = list;
228 list = next;
232 // consecutive references in the list that have the same
236 Reference<?> next = list
259 add(Reference<?> list) argument
[all...]
/libcore/luni/src/main/java/libcore/util/
H A DCollectionUtils.java82 * Sorts and removes duplicate elements from {@code list}. This method does
85 public static <T> void removeDuplicates(List<T> list, Comparator<? super T> comparator) { argument
86 Collections.sort(list, comparator);
88 for (int i = 1; i < list.size(); i++) {
89 if (comparator.compare(list.get(j - 1), list.get(i)) != 0) {
90 T object = list.get(i);
91 list.set(j++, object);
94 if (j < list.size()) {
95 list
[all...]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
H A DCopyOnWriteArrayListTest.java37 CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<String>();
38 list.addAll(Arrays.asList("a", "b", "c", "d", "e"));
39 Iterator<String> abcde = list.iterator();
41 list.set(1, "B");
49 * The sub list throws on non-structural changes, even though that disagrees
54 CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<String>();
55 list.addAll(Arrays.asList("a", "b", "c", "d", "e"));
56 List<String> bcd = list.subList(1, 4);
57 list.set(2, "C");
66 CopyOnWriteArrayList<String> list
177 testAddAllIsAtomic(final List<Object> list) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DAbstractListTest.java61 List list = new ArrayList();
62 list.add(new Integer(3));
63 list.add(new Integer(15));
64 list.add(new Integer(5));
65 list.add(new Integer(1));
66 list.add(new Integer(7));
68 Iterator i = list.iterator();
74 + " got: " + list.hashCode(), hashCode == list.hashCode());
81 SimpleList list
214 ArrayList<E> list = new ArrayList<E>(); field in class:AbstractListTest.MockArrayList
[all...]
H A DArrayListTest.java97 ArrayList<String> list = new ArrayList<String>(collection);
98 assertFalse(list.contains(null));
109 assertTrue("Failed to fix up list after insert",
201 assertEquals("Returned incorrect size after adding to existing list",
258 assertTrue("The object list is not the same as original list", list1
269 assertTrue("The object list is not the same as original list", obj
377 assertEquals("Returned incorrect size after adding to existing list",
380 assertTrue("Added to list i
[all...]
H A DControlTest.java90 List<String> list = FORMAT_CLASS;
91 assertEquals(1, list.size());
92 assertEquals("java.class", list.get(0));
93 list = FORMAT_PROPERTIES;
94 assertEquals(1, list.size());
95 assertEquals("java.properties", list.get(0));
96 list = FORMAT_DEFAULT;
97 assertEquals(2, list.size());
98 assertEquals("java.class", list.get(0));
99 assertEquals("java.properties", list
[all...]
/libcore/benchmarks/src/benchmarks/
H A DArrayListIterationBenchmark.java32 ArrayList<Foo> list = mList;
33 int len = list.size();
35 sum += list.get(i).mSplat;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DHttpCookieTest.java611 List<HttpCookie> list = HttpCookie
613 HttpCookie cookie = list.get(0);
617 list = HttpCookie
619 cookie = list.get(0);
623 list = HttpCookie
625 cookie = list.get(0);
631 list = HttpCookie
633 cookie = list.get(0);
639 list = HttpCookie.parse("Set-Cookie2:name=test;max-age=1000");
640 cookie = list
[all...]
/libcore/luni/src/test/java/libcore/xml/
H A DSimpleBuilderTest.java67 NodeList list = root.getElementsByTagName("nestedStuff");
68 assertNotNull(list);
69 assertEquals(list.getLength(), 4);
71 Element one = (Element) list.item(0);
72 Element two = (Element) list.item(1);
73 Element three = (Element) list.item(2);
74 Element four = (Element) list.item(3);
90 list = document.getChildNodes();
91 assertNotNull(list);
96 for (int i = 0; i < list
[all...]
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
H A DLoggingTestCase.java53 List<Object> list = new ArrayList<>();
54 Collections.addAll(list, result.getParameters());
55 list.add(context.toString());
56 result.setParameters(list.toArray(new Object[list.size()]));
H A DStreamTestDataProvider.java87 List<Object[]> list = new ArrayList<>();
93 list.add(arrayDataDescr("array:" + name, ints));
94 list.add(collectionDataDescr("ArrayList.asList:" + name, intsAsList));
95 list.add(collectionDataDescr("ArrayList:" + name, new ArrayList<>(intsAsList)));
96 list.add(streamDataDescr("DelegatingStream(ArrayList):" + name,
102 // deserialized sub-list will be out of sync with the
103 // enclosing list.
104 list.add(collectionDataDescr("ArrayList.Sublist:" + name,
107 list.add(collectionDataDescr("LinkedList:" + name, new LinkedList<>(intsAsList)));
108 list
[all...]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
H A DLoggingTestCase.java53 List<Object> list = new ArrayList<>();
54 Collections.addAll(list, result.getParameters());
55 list.add(context.toString());
56 result.setParameters(list.toArray(new Object[list.size()]));
H A DStreamTestDataProvider.java93 List<Object[]> list = new ArrayList<>();
99 list.add(arrayDataDescr("array:" + name, ints));
100 list.add(collectionDataDescr("ArrayList.asList:" + name, intsAsList));
101 list.add(collectionDataDescr("ArrayList:" + name, new ArrayList<>(intsAsList)));
102 list.add(streamDataDescr("DelegatingStream(ArrayList):" + name,
108 // deserialized sub-list will be out of sync with the
109 // enclosing list.
110 list.add(collectionDataDescr("ArrayList.Sublist:" + name,
113 list.add(collectionDataDescr("LinkedList:" + name, new LinkedList<>(intsAsList)));
114 list
[all...]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/cert/
H A DMyCertificateFactorySpi.java47 // mode: false - list of encodings is empty
48 // mode: true - list of encodings consists of 2 elements
52 private Set<String> list; field in class:MyCertificateFactorySpi
57 list = new HashSet<String>();
58 list.add("aa");
59 list.add("bb");
135 list.clear();
137 return list.iterator();
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DNodeListImpl.java42 NodeListImpl(List<NodeImpl> list) { argument
43 children = list;
/libcore/ojluni/src/main/java/java/security/
H A DUnresolvedPermissionCollection.java53 * Key is permission type, value is a list of the UnresolvedPermissions
170 // Convert list into Vector
171 List<UnresolvedPermission> list = e.getValue();
172 Vector<UnresolvedPermission> vec = new Vector<>(list.size());
173 synchronized (list) {
174 vec.addAll(list);
213 List<UnresolvedPermission> list = new ArrayList<>(vec.size());
214 list.addAll(vec);
217 perms.put(e.getKey(), list);
/libcore/ojluni/src/main/java/java/util/logging/
H A DLevel.java211 // to the KnownLevel list from which Level.parse method does its look up
415 // about a new log level. Add it to our list.
511 // KnownLevel class maintains the global list of all known levels.
547 // the mirroredLevel object is always added to the list
550 List<KnownLevel> list = nameToLevels.get(l.name);
551 if (list == null) {
552 list = new ArrayList<>();
553 nameToLevels.put(l.name, list);
555 list.add(o);
557 list
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DAbstractCookiesTest.java873 List<HttpCookie> list = cookieStore.get(uri);
874 assertEquals(1, list.size());
875 assertTrue(list.contains(cookie));
879 list = cookieStore.get(uri);
880 assertEquals(1, list.size());
881 assertEquals(" TESTVALUE1 ", list.get(0).getValue());
882 assertTrue(list.contains(cookie2));
889 list = cookieStore.get(uri);
890 assertEquals(2, list.size());
891 assertNull(list
[all...]

Completed in 1892 milliseconds

12345678