/libcore/ojluni/src/test/java/util/List/ |
D | ListFactories.java | 23 package test.java.util.List; 35 import java.util.List; 71 static Object[] a(List<String> act, List<String> exp) { in a() 78 a(List.of(), asList()) in empty() 85 a(List.of("a"), in nonempty() 87 a(List.of("a", "b"), in nonempty() 89 a(List.of("a", "b", "c"), in nonempty() 91 a(List.of("a", "b", "c", "d"), in nonempty() 93 a(List.of("a", "b", "c", "d", "e"), in nonempty() 95 a(List.of("a", "b", "c", "d", "e", "f"), in nonempty() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ListOfTest.java | 25 import java.util.List; 45 new SerializationTester<>(List.<String>of(), golden).test(); in serializationCompatibility_empty() 56 new SerializationTester<>(List.of("one"), golden).test(); in serializationCompatibility_oneElement() 71 new SerializationTester<>(List.of(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0), golden).test(); in serializationCompatibility_manyElements() 75 List<?> list = List.of("element", 42); in mixedTypes() 86 check_nonEmpty(asList("duplicate", "duplicate"), List.of("duplicate", "duplicate")); in duplicates_allowed() 91 Collections.<String>emptyList(), List.<String>of(), "non-null example String"); in empty() 95 check_nonEmpty(asList("one"), List.of("one")); in nonEmpty() 96 check_nonEmpty(asList("one", "two"), List.of("one", "two")); in nonEmpty() 97 check_nonEmpty(asList("one", "two", "three"), List.of("one", "two", "three")); in nonEmpty() [all …]
|
D | LocaleLanguageRangeTest.java | 25 import java.util.List; 158 List<LanguageRange> noRange = Collections.emptyList(); in testMapEquivalents_emptyList() 165 List<LanguageRange> inputRanges = Collections.unmodifiableList(Arrays.asList( in testMapEquivalents_emptyMap_createsModifiableCopy() 168 List<LanguageRange> outputRanges = in testMapEquivalents_emptyMap_createsModifiableCopy() 181 Map<String, List<String>> map = new HashMap<>(); in testMapEquivalents_exampleFromDocumentation() 186 List<LanguageRange> inputPriorityList = Arrays.asList( in testMapEquivalents_exampleFromDocumentation() 193 List<LanguageRange> expectedOutput = Arrays.asList( in testMapEquivalents_exampleFromDocumentation() 202 List<LanguageRange> outputProrityList = LanguageRange in testMapEquivalents_exampleFromDocumentation() 221 List<LanguageRange> priorityList = Collections.unmodifiableList(Arrays.asList( in testMapEquivalents_nullMap() 230 List<LanguageRange> expected = Arrays.asList( in testMapEquivalents() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | WrappedUnmodifiableCollections.java | 49 List<List<?>> lists = List.of(List.of(), List.of(1,2,3), List.of(1), in testUnmodifiableListsDontWrap() 50 List.of(1,2,3,4,5,6), in testUnmodifiableListsDontWrap() 51 List.of(1,2,3).subList(0,1), in testUnmodifiableListsDontWrap() 52 new LinkedList<>(List.of(1,2,3)), in testUnmodifiableListsDontWrap() 53 new ArrayList<>(List.of(1,2,3))); in testUnmodifiableListsDontWrap() 55 for(List<?> list : lists) { in testUnmodifiableListsDontWrap() 61 Collection<?> list = List.of(); in testUnmodifiableCollectionsDontWrap() 67 List<Set<?>> sets = List.of(new TreeSet<>(), in testUnmodifiableSetsDontWrap() 88 List<Map<?,?>> maps = List.of(treeMap, in testUnmodifiableMapsDontWrap()
|
D | Disjoint.java | 37 import java.util.List; 47 List[] lists = new List[N]; in main() 51 List<Integer> list = new ArrayList<>(size); in main() 63 List<Integer> a = (List<Integer>) lists[i]; in main() 64 List<Integer> b = (List<Integer>) lists[j]; in main()
|
D | CheckedListBash.java | 38 import java.util.List; 50 List s1 = newList(); in main() 53 List s2 = newList(); in main() 56 List intersection = clone(s1); intersection.retainAll(s2); in main() 57 List diff1 = clone(s1); diff1.removeAll(s2); in main() 58 List diff2 = clone(s2); diff2.removeAll(s1); in main() 59 List union = clone(s1); union.addAll(s2); in main() 112 List s = newList(); in main() 118 List even = clone(s); in main() 128 List odd = clone(s); in main() [all …]
|
D | RacingCollections.java | 43 import java.util.List; 118 if (elLoco instanceof List) { in realRun() 119 List<Integer> l = (List<Integer>) elLoco; in realRun() 227 private static List<Map<Integer, Boolean>> newConcurrentMaps() { in newConcurrentMaps() 228 List<Map<Integer, Boolean>> list = new ArrayList<>(); in newConcurrentMaps() 234 private static List<Map<Integer, Boolean>> maps() { in maps() 235 List<Map<Integer, Boolean>> list = newConcurrentMaps(); in maps() 247 private static List<Set<Integer>> newConcurrentSets() { in newConcurrentSets() 248 List<Set<Integer>> list = new ArrayList<>(); in newConcurrentSets() 254 private static List<Set<Integer>> newSets() { in newSets() [all …]
|
/libcore/ojluni/src/test/java/util/SequencedCollection/ |
D | Basic.java | 52 static final List<String> ORIGINAL = List.of("a", "b", "c", "d", "e", "f", "g"); 54 static List<String> cklist(List<String> contents) { in cklist() 66 static SequencedSet<String> setFromMap(List<String> contents) { in setFromMap() 77 static SequencedCollection<String> ulist(List<String> list) { in ulist() 93 static <T> List<T> copyReversed(List<T> list) { in copyReversed() 130 new Object[] { "ArrayDeque", new ArrayDeque<>(), List.of() }, in empties() 131 new Object[] { "ArrayList", new ArrayList<>(), List.of() }, in empties() 132 new Object[] { "AsList", Arrays.asList(new String[0]), List.of() }, in empties() 133 new Object[] { "COWAL", new CopyOnWriteArrayList<>(), List.of() }, in empties() 134 new Object[] { "EmptyList", Collections.emptyList(), List.of() }, in empties() [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | NodeBuilderTest.java | 27 import java.util.List; 43 List<Integer> sizes = Arrays.asList(0, 1, 4, 16, 256, 50 List<List<Integer>> ls = new ArrayList<>(); in createNodeBuilders() 55 List<Function<Integer, Node.Builder<Integer>>> ms = Arrays.asList( in createNodeBuilders() 62 for (List<Integer> l : ls) { in createNodeBuilders() 72 public void testIteration(List<Integer> l, Function<Integer, Node.Builder<Integer>> m) { in testIteration() 84 List<Integer> _l = new ArrayList<>(); in testIteration() 95 List<List<Integer>> ls = new ArrayList<>(); in createIntNodeBuilders() 100 List<Function<Integer, Node.Builder<Integer>>> ms = Arrays.asList( in createIntNodeBuilders() 107 for (List<Integer> l : ls) { in createIntNodeBuilders() [all …]
|
/libcore/ojluni/src/main/java/jdk/internal/util/ |
D | Preconditions.java | 29 import java.util.List; 57 BiFunction<String, List<Number>, ? extends RuntimeException> oobef, in outOfBounds() 60 List<Number> largs = List.of(args); in outOfBounds() 68 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckIndex() 74 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckFromToIndex() 80 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckFromIndexSize() 86 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckIndex() 92 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckFromToIndex() 98 BiFunction<String, List<Number>, ? extends RuntimeException> oobe, in outOfBoundsCheckFromIndexSize() 171 BiFunction<String, List<Number>, X> outOfBoundsExceptionFormatter(Function<String, X> f) { in outOfBoundsExceptionFormatter() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IterateTest.java | 35 import java.util.List; 53 {List.of(), in makeIterateStreamsTestData() 55 {List.of(1), in makeIterateStreamsTestData() 57 {List.of(1, 2, 4, 8, 16, 32, 64, 128, 256, 512), in makeIterateStreamsTestData() 59 {List.of(10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0), in makeIterateStreamsTestData() 61 {List.of(), in makeIterateStreamsTestData() 63 {List.of(1), in makeIterateStreamsTestData() 65 {List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), in makeIterateStreamsTestData() 67 {List.of(5, 4, 3, 2, 1), in makeIterateStreamsTestData() 69 {List.of(), in makeIterateStreamsTestData() [all …]
|
D | ForEachOpTest.java | 38 import java.util.List; 75 private <U> ResultAsserter<List<U>> resultAsserter() { in resultAsserter() 88 List<Integer> input = countTo(10000); 91 Function<Stream<Integer>, List<Integer>> terminalFunc = s -> { 92 List<Integer> l = new ArrayList<>(); 112 Function<Stream<Integer>, List<Integer>> terminalFunc = s -> { 113 List<Integer> l = Collections.synchronizedList(new ArrayList<>()); 135 List<Integer> input = countTo(10000); 139 Function<IntStream, List<Integer>> terminalFunc = s -> { 140 List<Integer> l = new ArrayList<>(); [all …]
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleMatcher.java | 31 import java.util.List; 46 public static List<Locale> filter(List<LanguageRange> priorityList, in filter() 54 List<String> tags = new ArrayList<>(); in filter() 60 List<String> filteredTags = filterTags(priorityList, tags, mode); in filter() 63 List<Locale> filteredLocales = new ArrayList<>(filteredTags.size()); in filter() 71 public static List<String> filterTags(List<LanguageRange> priorityList, in filterTags() 110 private static List<String> filterBasic(List<LanguageRange> priorityList, in filterBasic() 113 List<LanguageRange> nonZeroRanges; in filterBasic() 114 List<LanguageRange> zeroRanges; in filterBasic() 120 zeroRanges = List.of(); in filterBasic() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | InMemoryCookieStore.java | 31 import java.util.List; 66 private Map<URI, List<HttpCookie>> uriIndex = null; 117 public List<HttpCookie> get(URI uri) { in get() 123 List<HttpCookie> cookies = new ArrayList<HttpCookie>(); in get() 141 public List<HttpCookie> getCookies() { in getCookies() 143 List<HttpCookie> rt = new ArrayList<HttpCookie>(); in getCookies() 147 for (List<HttpCookie> list : uriIndex.values()) { in getCookies() 171 public List<URI> getURIs() { in getURIs() 197 List<URI> result = new ArrayList<URI>(uriIndex.keySet()); in getURIs() 223 List<HttpCookie> cookies = uriIndex.get(uri); in remove() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | List.java | 138 public interface List<E> extends SequencedCollection<E>, Collection<E> { interface 758 List<E> subList(int fromIndex, int toIndex); in subList() 922 default List<E> reversed() { in reversed() 939 static <E> List<E> of() { in of() 940 return (List<E>) ImmutableCollections.EMPTY_LIST; in of() 955 static <E> List<E> of(E e1) { in of() 972 static <E> List<E> of(E e1, E e2) { in of() 990 static <E> List<E> of(E e1, E e2, E e3) { in of() 1009 static <E> List<E> of(E e1, E e2, E e3, E e4) { in of() 1029 static <E> List<E> of(E e1, E e2, E e3, E e4, E e5) { in of() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | LinuxFileSystemTestData.java | 22 import java.util.List; 30 static List<TestData> getPathInputOutputTestData() { in getPathInputOutputTestData() 31 List<TestData> inputOutputTestCases = new ArrayList<>(); in getPathInputOutputTestData() 45 static List<TestData> getPathExceptionTestData() { in getPathExceptionTestData() 46 List<TestData> exceptionTestCases = new ArrayList<>(); in getPathExceptionTestData() 52 static List<TestData> getPath_URI_InputOutputTestData() { in getPath_URI_InputOutputTestData() 55 List<TestData> inputOutputTestCases = new ArrayList<>(); in getPath_URI_InputOutputTestData() 62 static List<TestData> getPath_URI_ExceptionTestData() { in getPath_URI_ExceptionTestData() 63 List<TestData> exceptionTestCases = new ArrayList<>(); in getPath_URI_ExceptionTestData()
|
/libcore/ojluni/annotations/flagged_api/java/util/ |
D | List.annotated.java | 30 public interface List<E> extends java.util.SequencedCollection<E>, java.util.Collection<E> { interface 84 public java.util.List<E> subList(int fromIndex, int toIndex); in subList() 101 public default java.util.List<E> reversed() { throw new RuntimeException("Stub!"); } in reversed() 103 public static <E> java.util.List<E> of() { throw new RuntimeException("Stub!"); } in of() 105 public static <E> java.util.List<E> of(E e1) { throw new RuntimeException("Stub!"); } in of() 107 public static <E> java.util.List<E> of(E e1, E e2) { throw new RuntimeException("Stub!"); } in of() 109 public static <E> java.util.List<E> of(E e1, E e2, E e3) { throw new RuntimeException("Stub!"); } in of() 111 public static <E> java.util.List<E> of(E e1, E e2, E e3, E e4) { throw new RuntimeException("Stub!"… in of() 113 public static <E> java.util.List<E> of(E e1, E e2, E e3, E e4, E e5) { throw new RuntimeException("… in of() 115 public static <E> java.util.List<E> of(E e1, E e2, E e3, E e4, E e5, E e6) { throw new RuntimeExcep… in of() [all …]
|
/libcore/ojluni/src/main/java/java/security/ |
D | UnresolvedPermissionCollection.java | 60 private transient ConcurrentHashMap<String, List<UnresolvedPermission>> perms; 88 public List<UnresolvedPermission> apply(String key, in add() 89 List<UnresolvedPermission> oldValue) { in add() 91 List<UnresolvedPermission> v = in add() 108 List<UnresolvedPermission> getUnresolvedPermissions(Permission p) { in getUnresolvedPermissions() 129 List<Permission> results = in elements() 133 for (List<UnresolvedPermission> l : perms.values()) { in elements() 171 Set<Map.Entry<String, List<UnresolvedPermission>>> set = perms.entrySet(); in writeObject() 172 for (Map.Entry<String, List<UnresolvedPermission>> e : set) { in writeObject() 174 List<UnresolvedPermission> list = e.getValue(); in writeObject() [all …]
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | AdjacencyList.java | 30 import java.util.List; 91 private List<List<Vertex>> mOrigList; 100 public AdjacencyList(List<List<Vertex>> list) { in AdjacencyList() 123 private boolean buildList(List<List<Vertex>> theList, int index, in buildList() 129 List<Vertex> l = theList.get(index); in buildList() 170 List<Vertex> possibles = new ArrayList<>(); in buildList() 247 for (List<Vertex> l : mOrigList) { in toString()
|
/libcore/ojluni/src/test/java/util/Objects/ |
D | CheckIndex.java | 38 import java.util.List; 54 static BiFunction<String, List<Number>, AssertingOutOfBoundsException> assertingOutOfBounds( in assertingOutOfBounds() 58 assertEquals(args, List.of(expArgs)); in assertingOutOfBounds() 68 …static BiFunction<String, List<Number>, AssertingOutOfBoundsException> assertingOutOfBoundsReturnN… in assertingOutOfBoundsReturnNull() 72 assertEquals(args, List.of(expArgs)); in assertingOutOfBoundsReturnNull() 81 List<Object[]> l = new ArrayList<>(); 98 apply("checkIndex", List.of(index, length)).getMessage(); 139 List<Object[]> l = new ArrayList<>(); 160 apply("checkFromToIndex", List.of(fromIndex, toIndex, length)).getMessage(); 201 List<Object[]> l = new ArrayList<>(); [all …]
|
D | CheckLongIndex.java | 37 import java.util.List; 53 static BiFunction<String, List<Number>, AssertingOutOfBoundsException> assertingOutOfBounds( in assertingOutOfBounds() 57 assertEquals(args, List.of(expArgs)); in assertingOutOfBounds() 67 …static BiFunction<String, List<Number>, AssertingOutOfBoundsException> assertingOutOfBoundsReturnN… in assertingOutOfBoundsReturnNull() 71 assertEquals(args, List.of(expArgs)); in assertingOutOfBoundsReturnNull() 80 List<Object[]> l = new ArrayList<>(); 97 apply("checkIndex", List.of(index, length)).getMessage(); 138 List<Object[]> l = new ArrayList<>(); 159 apply("checkFromToIndex", List.of(fromIndex, toIndex, length)).getMessage(); 200 List<Object[]> l = new ArrayList<>(); [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | FileLockTable.java | 68 public abstract List<FileLock> removeAll(); in removeAll() 106 private static ConcurrentHashMap<FileKey, List<FileLockReference>> lockMap = 107 new ConcurrentHashMap<FileKey, List<FileLockReference>>(); 125 List<FileLockReference> list = lockMap.get(fileKey); in add() 132 List<FileLockReference> prev; in add() 150 List<FileLockReference> current = lockMap.get(fileKey); in add() 165 private void removeKeyIfEmpty(FileKey fk, List<FileLockReference> list) { in removeKeyIfEmpty() 178 List<FileLockReference> list = lockMap.get(fileKey); in remove() 198 public List<FileLock> removeAll() { in removeAll() 199 List<FileLock> result = new ArrayList<FileLock>(); in removeAll() [all …]
|
/libcore/ojluni/src/test/java/util/stream/examples/ |
D | JavadocExamples.java | 27 import java.util.List; 48 List<Integer> integers = numbers.<Integer>mapMulti((number, consumer) -> { in testNumberIntegerExample() 55 assertEquals(integers, List.of(1,2)); in testNumberIntegerExample() 59 var nestedList = List.of(1, List.of(2, List.of(3, 4)), 5); in testExpandIterableExample() 62 assertEquals(expandedStream.toList(), List.of(1,2,3,4,5)); in testExpandIterableExample()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | CollectionsBenchmark.java | 23 import java.util.List; 42 List<Integer> input = buildList(arrayListLength, ArrayList.class); in timeSort_arrayList() 49 List<Integer> input = buildList(arrayListLength, ArrayList.class); in timeSortWithComparator_arrayList() 56 List<Integer> input = buildList(arrayListLength, Vector.class); in timeSort_vector() 63 List<Integer> input = buildList(arrayListLength, Vector.class); in timeSortWithComparator_vector() 69 private static <T extends List<Integer>> List<Integer> buildList( in buildList() 73 List<Integer> list = listClass.newInstance(); in buildList()
|
/libcore/tools/upstream/src/main/java/libcore/ |
D | CompareUpstreams.java | 27 import java.util.List; 91 private static Map<String, Integer> androidChangedComments(List<String> lines) { in androidChangedComments() 92 List<String> problems = new ArrayList<>(); in androidChangedComments() 122 private static String androidChangedCommentsSummary(List<String> lines) { in androidChangedCommentsSummary() 124 List<String> comments = new ArrayList<>(map.keySet()); in androidChangedCommentsSummary() 126 List<String> result = new ArrayList<>(); in androidChangedCommentsSummary() 145 private static void printTsv(PrintStream out, List<String> values) { in printTsv() 159 private void run(PrintStream out, List<Path> relPaths) throws IOException { in run() 161 List<String> headers = new ArrayList<>(); in run() 179 List<String> linesB = Util.readLines(ojluniFile); in run() [all …]
|