Searched refs:supplier (Results 1 - 24 of 24) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
H A DSpliteratorTest.java48 public void testSpliterator(String name, Supplier<Spliterator<Integer>> supplier) { argument
49 SpliteratorTestHelper.testSpliterator(supplier);
53 public void testIntSpliterator(String name, Supplier<Spliterator.OfInt> supplier) { argument
54 SpliteratorTestHelper.testIntSpliterator(supplier);
58 public void testLongSpliterator(String name, Supplier<Spliterator.OfLong> supplier) { argument
59 SpliteratorTestHelper.testLongSpliterator(supplier);
63 public void testDoubleSpliterator(String name, Supplier<Spliterator.OfDouble> supplier) { argument
64 SpliteratorTestHelper.testDoubleSpliterator(supplier);
H A DStreamBuilderTest.java120 private void testStreamBuilder(int size, Function<Integer, Stream<Integer>> supplier) { argument
122 () -> supplier.apply(size));
182 private void testIntStreamBuilder(int size, Function<Integer, IntStream> supplier) { argument
184 () -> supplier.apply(size));
244 private void testLongStreamBuilder(int size, Function<Integer, LongStream> supplier) { argument
246 () -> supplier.apply(size));
305 private void testDoubleStreamBuilder(int size, Function<Integer, DoubleStream> supplier) { argument
307 () -> supplier.apply(size));
H A DGroupByOpTest.java66 Map<Boolean, List<Integer>> m = collector.supplier().get();
/libcore/ojluni/src/main/java/java/util/stream/
H A DStreamSupport.java78 * <p>The {@link Supplier#get()} method will be invoked on the supplier no
89 * source. Since the supplier is only invoked after the terminal operation
96 * @param supplier a {@code Supplier} of a {@code Spliterator}
99 * {@code supplier.get().characteristics()}, otherwise undefined
107 public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, argument
110 Objects.requireNonNull(supplier);
111 return new ReferencePipeline.Head<>(supplier,
147 * <p>The {@link Supplier#get()} method will be invoked on the supplier no
158 * source. Since the supplier is only invoked after the terminal operation
164 * @param supplier
175 intStream(Supplier<? extends Spliterator.OfInt> supplier, int characteristics, boolean parallel) argument
243 longStream(Supplier<? extends Spliterator.OfLong> supplier, int characteristics, boolean parallel) argument
311 doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, int characteristics, boolean parallel) argument
[all...]
H A DCollector.java53 * <li>creation of a new result container ({@link #supplier()})</li>
64 * create a single result container using the supplier function, and invoke the
79 * be equivalent to {@code combiner.apply(a, supplier.get())}.
86 * A a1 = supplier.get();
91 * A a2 = supplier.get();
93 * A a3 = supplier.get();
112 * result supplier, accumulator, or combiner functions.</li>
114 * the result supplier, accumulator, or combiner functions other than to
123 * supplier, accumulator, or combiner functions must be serially
157 * R container = collector.supplier()
203 Supplier<A> supplier(); method in interface:Collector
260 of(Supplier<R> supplier, BiConsumer<R, T> accumulator, BinaryOperator<R> combiner, Characteristics... characteristics) argument
291 of(Supplier<A> supplier, BiConsumer<A, T> accumulator, BinaryOperator<A> combiner, Function<A, R> finisher, Characteristics... characteristics) argument
[all...]
H A DReduceOps.java157 Supplier<I> supplier = Objects.requireNonNull(collector).supplier();
164 state = supplier.get();
334 * @param supplier a factory to produce a new accumulator of the result type
341 makeInt(Supplier<R> supplier, argument
344 Objects.requireNonNull(supplier);
351 state = supplier.get();
470 * @param supplier a factory to produce a new accumulator of the result type
477 makeLong(Supplier<R> supplier, argument
480 Objects.requireNonNull(supplier);
613 makeDouble(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BinaryOperator<R> combiner) argument
[all...]
H A DCollectors.java148 private final Supplier<A> supplier; field in class:Collectors.CollectorImpl
154 CollectorImpl(Supplier<A> supplier, argument
159 this.supplier = supplier;
166 CollectorImpl(Supplier<A> supplier, argument
170 this(supplier, accumulator, combiner, castingIdentity(), characteristics);
179 public Supplier<A> supplier() { method in class:Collectors.CollectorImpl
180 return supplier;
354 return new CollectorImpl<>(downstream.supplier(),
390 return new CollectorImpl<>(downstream.supplier(),
[all...]
H A DStreamSpliterators.java76 * spliterator or a supplier.
82 * supplier.
273 Supplier<Spliterator<P_IN>> supplier,
275 super(ph, supplier, parallel);
326 Supplier<Spliterator<P_IN>> supplier,
328 super(ph, supplier, parallel);
384 Supplier<Spliterator<P_IN>> supplier,
386 super(ph, supplier, parallel);
442 Supplier<Spliterator<P_IN>> supplier,
444 super(ph, supplier, paralle
272 WrappingSpliterator(PipelineHelper<P_OUT> ph, Supplier<Spliterator<P_IN>> supplier, boolean parallel) argument
325 IntWrappingSpliterator(PipelineHelper<Integer> ph, Supplier<Spliterator<P_IN>> supplier, boolean parallel) argument
383 LongWrappingSpliterator(PipelineHelper<Long> ph, Supplier<Spliterator<P_IN>> supplier, boolean parallel) argument
441 DoubleWrappingSpliterator(PipelineHelper<Double> ph, Supplier<Spliterator<P_IN>> supplier, boolean parallel) argument
503 private final Supplier<? extends T_SPLITR> supplier; field in class:StreamSpliterators.DelegatingSpliterator
507 DelegatingSpliterator(Supplier<? extends T_SPLITR> supplier) argument
562 OfPrimitive(Supplier<? extends T_SPLITR> supplier) argument
581 OfInt(Supplier<Spliterator.OfInt> supplier) argument
590 OfLong(Supplier<Spliterator.OfLong> supplier) argument
599 OfDouble(Supplier<Spliterator.OfDouble> supplier) argument
[all...]
H A DDoublePipeline.java145 Supplier<Spliterator<P_IN>> supplier,
147 return new StreamSpliterators.DoubleWrappingSpliterator<>(ph, supplier, isParallel);
152 public final Spliterator.OfDouble lazySpliterator(Supplier<? extends Spliterator<Double>> supplier) { argument
153 return new StreamSpliterators.DelegatingSpliterator.OfDouble((Supplier<Spliterator.OfDouble>) supplier);
470 public final <R> R collect(Supplier<R> supplier, argument
477 return evaluate(ReduceOps.makeDouble(supplier, accumulator, operator));
144 wrap(PipelineHelper<Double> ph, Supplier<Spliterator<P_IN>> supplier, boolean isParallel) argument
H A DLongPipeline.java146 Supplier<Spliterator<P_IN>> supplier,
148 return new StreamSpliterators.LongWrappingSpliterator<>(ph, supplier, isParallel);
153 public final Spliterator.OfLong lazySpliterator(Supplier<? extends Spliterator<Long>> supplier) { argument
154 return new StreamSpliterators.DelegatingSpliterator.OfLong((Supplier<Spliterator.OfLong>) supplier);
448 public final <R> R collect(Supplier<R> supplier, argument
455 return evaluate(ReduceOps.makeLong(supplier, accumulator, operator));
145 wrap(PipelineHelper<Long> ph, Supplier<Spliterator<P_IN>> supplier, boolean isParallel) argument
H A DReferencePipeline.java115 Supplier<Spliterator<P_IN>> supplier,
117 return new StreamSpliterators.WrappingSpliterator<>(ph, supplier, isParallel);
121 public final Spliterator<P_OUT> lazySpliterator(Supplier<? extends Spliterator<P_OUT>> supplier) { argument
122 return new StreamSpliterators.DelegatingSpliterator<>(supplier);
495 container = collector.supplier().get();
508 public final <R> R collect(Supplier<R> supplier, argument
511 return evaluate(ReduceOps.makeRef(supplier, accumulator, combiner));
114 wrap(PipelineHelper<P_OUT> ph, Supplier<Spliterator<P_IN>> supplier, boolean isParallel) argument
H A DIntPipeline.java148 Supplier<Spliterator<P_IN>> supplier,
150 return new StreamSpliterators.IntWrappingSpliterator<>(ph, supplier, isParallel);
155 public final Spliterator.OfInt lazySpliterator(Supplier<? extends Spliterator<Integer>> supplier) { argument
156 return new StreamSpliterators.DelegatingSpliterator.OfInt((Supplier<Spliterator.OfInt>) supplier);
466 public final <R> R collect(Supplier<R> supplier, argument
473 return evaluate(ReduceOps.makeInt(supplier, accumulator, operator));
147 wrap(PipelineHelper<Integer> ph, Supplier<Spliterator<P_IN>> supplier, boolean isParallel) argument
H A DDoubleStream.java422 * R result = supplier.get();
436 * @param supplier a function that creates a new result container. For a
451 <R> R collect(Supplier<R> supplier, argument
H A DAbstractPipeline.java127 * The source supplier. Only valid for the head pipeline. Before the
584 * @param supplier the supplier of a spliterator
588 Supplier<Spliterator<P_IN>> supplier,
594 * @param supplier the supplier of a spliterator
596 public abstract Spliterator<E_OUT> lazySpliterator(Supplier<? extends Spliterator<E_OUT>> supplier); argument
587 wrap(PipelineHelper<E_OUT> ph, Supplier<Spliterator<P_IN>> supplier, boolean isParallel) argument
H A DIntStream.java417 * R result = supplier.get();
430 * @param supplier a function that creates a new result container. For a
445 <R> R collect(Supplier<R> supplier, argument
H A DLongStream.java421 * R result = supplier.get();
434 * @param supplier a function that creates a new result container. For a
449 <R> R collect(Supplier<R> supplier, argument
H A DStream.java705 * R result = supplier.get();
734 * @param supplier a function that creates a new result container. For a
748 <R> R collect(Supplier<R> supplier, argument
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
H A DSpliteratorTestHelper.java59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { argument
60 testSpliterator(supplier, defaultContentAsserter());
63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, argument
65 testSpliterator(supplier, (Consumer<Integer> b) -> b, asserter);
68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { argument
69 testIntSpliterator(supplier, defaultContentAsserter());
72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, argument
92 testSpliterator(supplier, BoxingAdapter::new, asserter);
95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { argument
96 testLongSpliterator(supplier, defaultContentAsserte
99 testLongSpliterator(Supplier<Spliterator.OfLong> supplier, ContentAsserter<Long> asserter) argument
122 testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) argument
126 testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, ContentAsserter<Double> asserter) argument
149 testSpliterator(Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
197 testForEach( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
227 testTryAdvance( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
257 testMixedTryAdvanceForEach( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
288 testMixedTraverseAndSplit( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
332 testSplitAfterFullTraversal( Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter) argument
355 testSplitOnce( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
383 testSplitSixDeep( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
479 testSplitUntilNull( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
[all...]
H A DTestData.java96 public static <T> OfRef<T> ofSupplier(String name, Supplier<Stream<T>> supplier) { argument
97 return new AbstractTestData.RefTestData<>(name, supplier,
126 public static OfInt ofIntSupplier(String name, Supplier<IntStream> supplier) { argument
127 return new AbstractTestData.IntTestData<>(name, supplier,
157 public static OfLong ofLongSupplier(String name, Supplier<LongStream> supplier) { argument
158 return new AbstractTestData.LongTestData<>(name, supplier,
188 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { argument
189 return new AbstractTestData.DoubleTestData<>(name, supplier,
H A DStreamTestDataProvider.java173 static <T> Object[] streamDataDescr(String description, Supplier<Stream<T>> supplier) { argument
174 return new Object[] { description, TestData.Factory.ofSupplier(description, supplier)};
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
H A DSpliteratorTestHelper.java59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { argument
60 testSpliterator(supplier, defaultContentAsserter());
63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, argument
65 testSpliterator(supplier, (Consumer<Integer> b) -> b, asserter);
68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { argument
69 testIntSpliterator(supplier, defaultContentAsserter());
72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, argument
92 testSpliterator(supplier, BoxingAdapter::new, asserter);
95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { argument
96 testLongSpliterator(supplier, defaultContentAsserte
99 testLongSpliterator(Supplier<Spliterator.OfLong> supplier, ContentAsserter<Long> asserter) argument
122 testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) argument
126 testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, ContentAsserter<Double> asserter) argument
149 testSpliterator(Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
197 testForEach( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
227 testTryAdvance( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
257 testMixedTryAdvanceForEach( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
288 testMixedTraverseAndSplit( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
332 testSplitAfterFullTraversal( Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter) argument
355 testSplitOnce( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
383 testSplitSixDeep( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
479 testSplitUntilNull( Collection<T> exp, Supplier<S> supplier, UnaryOperator<Consumer<T>> boxingAdapter, ContentAsserter<T> asserter) argument
[all...]
H A DTestData.java97 public static <T> OfRef<T> ofSupplier(String name, Supplier<Stream<T>> supplier) { argument
98 return new AbstractTestData.RefTestData<>(name, supplier,
127 public static OfInt ofIntSupplier(String name, Supplier<IntStream> supplier) { argument
128 return new AbstractTestData.IntTestData<>(name, supplier,
158 public static OfLong ofLongSupplier(String name, Supplier<LongStream> supplier) { argument
159 return new AbstractTestData.LongTestData<>(name, supplier,
189 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { argument
190 return new AbstractTestData.DoubleTestData<>(name, supplier,
H A DStreamTestDataProvider.java176 static <T> Object[] streamDataDescr(String description, Supplier<Stream<T>> supplier) { argument
177 return new Object[] { description, TestData.Factory.ofSupplier(description, supplier)};
/libcore/luni/src/main/java/java/util/concurrent/
H A DCompletableFuture.java45 * example: {@code supplyAsync(supplier, delayedExecutor(timeout,
1805 * @param supplier a function returning the value to be used
1810 public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) { argument
1811 return asyncSupplyStage(ASYNC_POOL, supplier);
1819 * @param supplier a function returning the value to be used
1825 public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier, argument
1827 return asyncSupplyStage(screenExecutor(executor), supplier);
2447 * @param supplier a function returning the value to be used
2455 public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier, argument
2457 if (supplier
2475 completeAsync(Supplier<? extends T> supplier) argument
2735 completeAsync(Supplier<? extends T> supplier, Executor executor) argument
2738 completeAsync(Supplier<? extends T> supplier) argument
[all...]

Completed in 240 milliseconds