| Modifier and Type | Method and Description |
|---|---|
static <E,U> AsyncGenerator<U> |
AsyncGenerator.collect(Collection<E> collection,
BiConsumer<E,Consumer<CompletableFuture<U>>> consumer)
Collects asynchronous elements from a collection.
|
static <E,U> AsyncGenerator<U> |
AsyncGenerator.collect(Iterator<E> iterator,
BiConsumer<E,Consumer<CompletableFuture<U>>> consumer)
Collects asynchronous elements from an iterator.
|
static <E> AsyncGenerator<E> |
AsyncGenerator.empty()
Returns an empty AsyncGenerator.
|
static <E,U> AsyncGenerator<U> |
AsyncGenerator.map(Collection<E> collection,
Function<E,CompletableFuture<U>> mapFunction)
create a generator, mapping each element to an asynchronous counterpart.
|
static <E,U> AsyncGenerator<U> |
AsyncGenerator.map(Iterator<E> iterator,
Function<E,CompletableFuture<U>> mapFunction)
create a generator, mapping each element to an asynchronous counterpart.
|
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> |
AsyncGeneratorQueue.of(Q queue,
Consumer<Q> consumer)
Creates an AsyncGenerator from the provided blocking queue and consumer.
|
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> |
AsyncGeneratorQueue.of(Q queue,
Executor executor,
Consumer<Q> consumer)
Creates an AsyncGenerator from the provided queue, executor, and consumer.
|
Copyright © 2024. All rights reserved.