Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 521) sorted by relevance

12345678910>>...21

/libcore/ojluni/src/main/java/java/util/stream/
DStream.java164 public interface Stream<T> extends BaseStream<T, Stream<T>> {
179 Stream<T> filter(Predicate<? super T> predicate); in filter()
194 <R> Stream<R> map(Function<? super T, ? extends R> mapper); in map() argument
208 IntStream mapToInt(ToIntFunction<? super T> mapper); in mapToInt()
222 LongStream mapToLong(ToLongFunction<? super T> mapper); in mapToLong()
236 DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper); in mapToDouble()
281 <R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends R>> mapper); in flatMap() argument
301 IntStream flatMapToInt(Function<? super T, ? extends IntStream> mapper); in flatMapToInt() argument
321 LongStream flatMapToLong(Function<? super T, ? extends LongStream> mapper); in flatMapToLong() argument
341 DoubleStream flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper); in flatMapToDouble() argument
[all …]
DCollectors.java175 private static <T, K, V>
176 BiConsumer<Map<K, V>, T> uniqKeysMapAccumulator(Function<? super T, ? extends K> keyMapper,
177 Function<? super T, ? extends V> valueMapper) {
197 static class CollectorImpl<T, A, R> implements Collector<T, A, R> {
199 private final BiConsumer<A, T> accumulator;
205 BiConsumer<A, T> accumulator,
217 BiConsumer<A, T> accumulator,
224 public BiConsumer<A, T> accumulator() {
261 public static <T, C extends Collection<T>>
262 Collector<T, ?, C> toCollection(Supplier<C> collectionFactory) {
[all …]
DDistinctOps.java54 static <T> ReferencePipeline<T, T> makeRef(AbstractPipeline<?, T, ?> upstream) { in makeRef() argument
55 return new ReferencePipeline.StatefulOp<T, T>(upstream, StreamShape.REFERENCE, in makeRef()
58 <P_IN> Node<T> reduce(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) { in makeRef()
61 TerminalOp<T, LinkedHashSet<T>> reduceOp in makeRef()
62 … = ReduceOps.<T, LinkedHashSet<T>>makeRef(LinkedHashSet::new, LinkedHashSet::add, in makeRef()
69 public <P_IN> Node<T> opEvaluateParallel(PipelineHelper<T> helper, in makeRef()
71 IntFunction<T[]> generator) { in makeRef()
82 ConcurrentHashMap<T, Boolean> map = new ConcurrentHashMap<>(); in makeRef()
83 TerminalOp<T, Void> forEachOp = ForEachOps.makeRef(t -> { in makeRef()
93 Set<T> keys = map.keySet(); in makeRef()
[all …]
/libcore/ojluni/annotations/flagged_api/java/util/stream/
DCollectors.annotated.java33 public static <T, C extends java.util.Collection<T>> java.util.stream.Collector<T,?,C> toCollection… in toCollection()
35 public static <T> java.util.stream.Collector<T,?,java.util.List<T>> toList() { throw new RuntimeExc… in toList()
37 public static <T> java.util.stream.Collector<T,?,java.util.List<T>> toUnmodifiableList() { throw ne… in toUnmodifiableList()
39 public static <T> java.util.stream.Collector<T,?,java.util.Set<T>> toSet() { throw new RuntimeExcep… in toSet()
41 public static <T> java.util.stream.Collector<T,?,java.util.Set<T>> toUnmodifiableSet() { throw new … in toUnmodifiableSet()
49 public static <T, U, A, R> java.util.stream.Collector<T,?,R> mapping(java.util.function.Function<? … in mapping() argument
51 public static <T, U, A, R> java.util.stream.Collector<T,?,R> flatMapping(java.util.function.Functio… in flatMapping() argument
53 …atic <T, A, R> java.util.stream.Collector<T,?,R> filtering(java.util.function.Predicate<? super T>… in filtering() argument
55 public static <T, A, R, RR> java.util.stream.Collector<T,A,RR> collectingAndThen(java.util.stream.C… in collectingAndThen() argument
57 public static <T> java.util.stream.Collector<T,?,java.lang.Long> counting() { throw new RuntimeExce… in counting()
[all …]
/libcore/ojluni/src/main/java/java/util/
DComparator.java116 public interface Comparator<T> {
153 int compare(T o1, T o2); in compare()
188 default Comparator<T> reversed() { in reversed()
217 default Comparator<T> thenComparing(Comparator<? super T> other) { in thenComparing()
219 return (Comparator<T> & Serializable) (c1, c2) -> { in thenComparing()
242 default <U> Comparator<T> thenComparing( in thenComparing()
243 Function<? super T, ? extends U> keyExtractor, in thenComparing() argument
266 default <U extends Comparable<? super U>> Comparator<T> thenComparing( in thenComparing()
267 Function<? super T, ? extends U> keyExtractor) in thenComparing() argument
287 default Comparator<T> thenComparingInt(ToIntFunction<? super T> keyExtractor) { in thenComparingInt()
[all …]
DOptional.java62 public final class Optional<T> {
71 private final T value;
86 public static<T> Optional<T> empty() { in empty()
88 Optional<T> t = (Optional<T>) EMPTY; in empty()
99 private Optional(T value) { in Optional()
112 public static <T> Optional<T> of(T value) { in of()
126 public static <T> Optional<T> ofNullable(T value) { in ofNullable()
127 return value == null ? (Optional<T>) EMPTY in ofNullable()
141 public T get() { in get()
176 public void ifPresent(Consumer<? super T> action) { in ifPresent()
[all …]
/libcore/ojluni/src/main/java/java/security/
DAccessController.java45 public static <T> T doPrivileged(PrivilegedAction<T> action) { in doPrivileged()
52 public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) { in doPrivilegedWithCombiner()
60 public static <T> T doPrivileged(PrivilegedAction<T> action, in doPrivileged()
70 public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action, in doPrivilegedWithCombiner()
78 public static <T> T
79 doPrivileged(PrivilegedExceptionAction<T> action) in doPrivileged()
92 public static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action) in doPrivilegedWithCombiner()
102 public static <T> T
103 doPrivileged(PrivilegedExceptionAction<T> action, in doPrivileged()
114 public static <T> T doPrivileged(PrivilegedExceptionAction<T> action, in doPrivileged()
[all …]
/libcore/ojluni/annotations/flagged_api/java/util/
DCollections.annotated.java35 public static <T extends java.lang.Comparable<? super T>> void sort(java.util.List<T> list) { throw… in sort()
37 public static <T> void sort(java.util.List<T> list, java.util.Comparator<? super T> c) { throw new … in sort()
39 public static <T> int binarySearch(java.util.List<? extends java.lang.Comparable<? super T>> list, in binarySearch()
41 public static <T> int binarySearch(java.util.List<? extends T> list, T key, java.util.Comparator<? … in binarySearch()
54 public static <T> void fill(java.util.List<? super T> list, T obj) { throw new RuntimeException("St… in fill()
56 public static <T> void copy(java.util.List<? super T> dest, java.util.List<? extends T> src) { thro… in copy()
58 public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T min(java.util.Collec… in min()
60 public static <T> T min(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> com… in min()
62 public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T max(java.util.Collec… in max()
64 public static <T> T max(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> com… in max()
[all …]
/libcore/ojluni/src/test/java/util/Collection/testlibrary/
DCollectionAsserts.java74 public static<T extends Comparable<? super T>> void assertSorted(Iterator<T> i) { in assertSorted()
77 T last = i.next(); in assertSorted()
79 T t = i.next(); in assertSorted()
86 public static<T> void assertSorted(Iterator<T> i, Comparator<? super T> comp) { in assertSorted()
89 T last = i.next(); in assertSorted()
91 T t = i.next(); in assertSorted()
98 public static<T extends Comparable<? super T>> void assertSorted(Iterable<T> iter) { in assertSorted()
102 public static<T> void assertSorted(Iterable<T> iter, Comparator<? super T> comp) { in assertSorted()
106 public static <T> void assertUnique(Iterable<T> iter) { in assertUnique()
110 public static<T> void assertUnique(Iterator<T> iter) { in assertUnique()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DSpliteratorTester.java43 public static <T> void runBasicIterationTests(Spliterator<T> spliterator, in runBasicIterationTests()
44 List<T> expectedElements) { in runBasicIterationTests()
45 List<T> recorder = new ArrayList<T>(expectedElements.size()); in runBasicIterationTests()
46 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests()
58 spliterator.forEachRemaining((T) -> fail()); in runBasicIterationTests()
61 public static <T> void runBasicIterationTests_unordered(Spliterator<T> spliterator, in runBasicIterationTests_unordered()
62 List<T> expectedElements, Comparator<T> comparator) { in runBasicIterationTests_unordered()
63 ArrayList<T> recorder = new ArrayList<T>(expectedElements.size()); in runBasicIterationTests_unordered()
64 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests_unordered()
82 spliterator.forEachRemaining((T) -> fail()); in runBasicIterationTests_unordered()
[all …]
DForEachRemainingTester.java36 public static <T> void runTests(Supplier<? extends Collection<T>> collectionSupplier, in runTests()
37 T[] initialData) throws Exception { in runTests()
42 Collection<T> collection = collectionSupplier.get(); in runTests()
44 List<T> asList = (List<T>) collection; in runTests()
51 public static <T> void test_forEachRemaining_list(List<T> collection, T[] initialData) in test_forEachRemaining_list()
55 ArrayList<T> recorder = new ArrayList<>(); in test_forEachRemaining_list()
56 ListIterator<T> lit = collection.listIterator(1); in test_forEachRemaining_list()
58 lit.forEachRemaining((T i) -> recorder.add(i)); in test_forEachRemaining_list()
67 public static <T> void test_forEachRemaining(Collection<T> collection, T[] initialData) in test_forEachRemaining()
71 ArrayList<T> recorder = new ArrayList<>(); in test_forEachRemaining()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DAbstractExecutorService.java97 protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) { in newTaskFor()
98 return new FutureTask<T>(runnable, value); in newTaskFor()
112 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor()
113 return new FutureTask<T>(callable); in newTaskFor()
131 public <T> Future<T> submit(Runnable task, T result) { in submit()
133 RunnableFuture<T> ftask = newTaskFor(task, result); in submit()
142 public <T> Future<T> submit(Callable<T> task) { in submit()
144 RunnableFuture<T> ftask = newTaskFor(task); in submit()
152 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, in doInvokeAny()
160 ArrayList<Future<T>> futures = new ArrayList<>(ntasks); in doInvokeAny()
[all …]
DCompletionStage.java151 public interface CompletionStage<T> {
170 public <U> CompletionStage<U> thenApply(Function<? super T,? extends U> fn); in thenApply() argument
187 (Function<? super T,? extends U> fn); in thenApplyAsync() argument
204 (Function<? super T,? extends U> fn, in thenApplyAsync() argument
219 public CompletionStage<Void> thenAccept(Consumer<? super T> action); in thenAccept()
234 public CompletionStage<Void> thenAcceptAsync(Consumer<? super T> action); in thenAcceptAsync()
249 public CompletionStage<Void> thenAcceptAsync(Consumer<? super T> action, in thenAcceptAsync()
310 BiFunction<? super T,? super U,? extends V> fn); in thenCombine() argument
330 BiFunction<? super T,? super U,? extends V> fn); in thenCombineAsync() argument
351 BiFunction<? super T,? super U,? extends V> fn, in thenCombineAsync() argument
[all …]
DExecutorService.java226 <T> Future<T> submit(Callable<T> task); in submit()
241 <T> Future<T> submit(Runnable task, T result); in submit()
277 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
308 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll()
331 <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny()
357 <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCompletionStageTest.java40 static abstract class BaseStage<T> implements CompletionStage<T> {
41 private T resultObj = null;
48 BaseStage(T result) { in BaseStage()
81 protected abstract T doGet() throws Throwable; in doGet()
83 public T get() throws Throwable { in get()
100 public <U> CompletionStage<U> thenApply(Function<? super T,? extends U> fn) { in thenApply() argument
104 public <U> CompletionStage<U> thenApplyAsync(Function<? super T,? extends U> fn) { in thenApplyAsync() argument
108 public <U> CompletionStage<U> thenApplyAsync(Function<? super T,? extends U> fn, in thenApplyAsync() argument
113 public CompletionStage<Void> thenAccept(Consumer<? super T> action) { in thenAccept()
117 public CompletionStage<Void> thenAcceptAsync(Consumer<? super T> action) { in thenAcceptAsync()
[all …]
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DLongStreamTestScenario.java47 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
48 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
59 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
60 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_TO_ARRAY() argument
68 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
69 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_ITERATOR() argument
77 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
78 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_SPLITERATOR() argument
86 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
87 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DIntStreamTestScenario.java47 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
48 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
59 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
60 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_TO_ARRAY() argument
68 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
69 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_ITERATOR() argument
77 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
78 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_SPLITERATOR() argument
86 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
87 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DDoubleStreamTestScenario.java47 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
48 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
59 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
60 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_TO_ARRAY() argument
68 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
69 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_ITERATOR() argument
77 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
78 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR() argument
86 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
87 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DStreamTestScenario.java46 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
47 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
59 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_COLLECT()
60 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_COLLECT() argument
69 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
70 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_TO_ARRAY() argument
79 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
80 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_ITERATOR() argument
88 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
89 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_SPLITERATOR() argument
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DLongStreamTestScenario.java50 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
51 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
62 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
63 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_TO_ARRAY() argument
71 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
72 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_ITERATOR() argument
80 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
81 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_SPLITERATOR() argument
89 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
90 void _run(TestData<T, S_IN> data, LongConsumer b, Function<S_IN, LongStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DIntStreamTestScenario.java50 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
51 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
62 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
63 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_TO_ARRAY() argument
71 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
72 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_ITERATOR() argument
80 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
81 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_SPLITERATOR() argument
89 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
90 void _run(TestData<T, S_IN> data, IntConsumer b, Function<S_IN, IntStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DDoubleStreamTestScenario.java51 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
52 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
63 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
64 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_TO_ARRAY() argument
72 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
73 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_ITERATOR() argument
81 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
82 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR() argument
90 <T, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
91 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT() argument
[all …]
DStreamTestScenario.java49 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE()
50 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_FOR_EACH_WITH_CLOSE() argument
62 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_COLLECT()
63 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_COLLECT() argument
72 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY()
73 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_TO_ARRAY() argument
82 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR()
83 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_ITERATOR() argument
91 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_SPLITERATOR()
92 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_SPLITERATOR() argument
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/
DSpliteratorTestHelper.java36 public interface ContentAsserter<T> {
37 void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered); in assertContents()
44 private static <T> ContentAsserter<T> defaultContentAsserter() { in defaultContentAsserter()
45 return (ContentAsserter<T>) DEFAULT_CONTENT_ASSERTER; in defaultContentAsserter()
150 public static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator()
151 … UnaryOperator<Consumer<T>> boxingAdapter, in testSpliterator()
152 ContentAsserter<T> asserter) { in testSpliterator()
153 ArrayList<T> fromForEach = new ArrayList<>(); in testSpliterator()
154 Spliterator<T> spliterator = supplier.get(); in testSpliterator()
155 Consumer<T> addToFromForEach = boxingAdapter.apply(fromForEach::add); in testSpliterator()
[all …]
/libcore/luni/src/test/native/
Dlibcore_io_Memory_test.cpp27 template<typename T, size_t NUM_ELEMENTS>
28 void swap_align_test(void (*swap_func)(T*, const T*, size_t), in swap_align_test() argument
29 std::function<void (T*, T*, uint64_t)> init_func) { in swap_align_test() argument
33 sizeof(T) * NUM_ELEMENTS + ALIGNMENT)); in swap_align_test()
35 sizeof(T) * NUM_ELEMENTS + ALIGNMENT)); in swap_align_test()
37 T src_buf[NUM_ELEMENTS]; in swap_align_test()
38 T dst_buf[NUM_ELEMENTS]; in swap_align_test()
45 T* dst_aligned = reinterpret_cast<T*>(&dst[dst_align]); in swap_align_test()
47 T* src_aligned = reinterpret_cast<T*>(&src[src_align]); in swap_align_test()
48 memset(dst_aligned, 0, sizeof(T) * NUM_ELEMENTS); in swap_align_test()
[all …]

12345678910>>...21