Class GroupedStreamable<K,T>
java.lang.Object
io.reactivex.rxjava4.core.GroupedStreamable<K,T>
- Type Parameters:
K- the type of the key, can be nullT- the type of the items emitted by theGroupedStreamable
- All Implemented Interfaces:
Streamable<T>
public abstract class GroupedStreamable<@Nullable K, @NonNull T>
extends Object
implements Streamable<T>
An
Streamable that has been grouped by key, the value of which can be obtained with getKey().- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGroupedStreamable(@Nullable K key) Constructs a GroupedStreamable with the given key. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Streamable
blockingFirst, collect, delay, doOnError, doOnNext, filter, flatMap, forEach, forEach, forEach, forEach, forEach, groupBy, hide, intercept, last, lastOrError, lift, map, mapOptional, onErrorResumeNext, skip, stream, subscribe, subscribe, subscribe, subscribe, take, takeUntil, takeWhile, test, test, timeout, to, toFlowable, toFlowable, toObservable, transform, transformModifier and TypeMethodDescriptiondefault TBlocks the current thread until thisStreamableproduces one item, which is then returneddefault <A,R> @NonNull Streamable <R> Collects all upstream values via the use of aCollectorconfiguration and emits its resulting value as a single item of the returnedStreamable.default @NonNull Streamable<T> Delays the delivery of each upstream item by the given time amount.default @NonNull Streamable<T> Calls the specificConsumerif there is an error from the upstream.default @NonNull Streamable<T> Calls the given consumer whenever an upstream item becomes available.default @NonNull Streamable<T> Filters out the upstream items that do not pass the given predicate.default <R> @NonNull Streamable<R> flatMap(@NonNull Function<? super @NonNull T, ? extends Streamable<? extends R>> mapper, @NonNull StandardConcurrentConfig config) Maps each upstream item onto aStreamableand runs them concurrently while relaying inner items as first-come-first-served manner.default @NonNull CompletionStageDisposable<Void> forEach(@NonNull BiConsumer<? super @NonNull T, ? super Disposable> consumer, @NonNull DisposableStreamerCancellation canceller, @NonNull ExecutorService executor) Consumes elements from thisStreamablevia the provided executor service.default @NonNull CompletionStageDisposable<Void> Consumes elements from thisStreamablevia the provided executor service.default @NonNull CompletionStageDisposable<Void> forEach(@NonNull Consumer<? super @NonNull T> consumer, @NonNull DisposableStreamerCancellation canceller) Consumes elements from thisStreamablevia the provided executor service.default @NonNull CompletionStageDisposable<Void> forEach(@NonNull Consumer<? super @NonNull T> consumer, @NonNull DisposableStreamerCancellation canceller, @NonNull ExecutorService executor) Consumes elements from thisStreamablevia the provided executor service.default @NonNull CompletionStageDisposable<Void> Consumes elements from thisStreamablevia the provided executor service.default <@Nullable K>
@NonNull Streamable<GroupedStreamable<K, T>> Maps each upstream item into aGroupedStreamablegroup, emits those groups and keeps relaying the upstream items into those groups.default @NonNull Streamable<T> hide()Hides the identity of thisStreamableand itsStreamer.default @NonNull Streamable<T> intercept(StreamableInterceptConfig<@NonNull T> config) Intercepts the lifecycle method calls ofStreamableandStreamerand allows the modification of them via Function callbacks.Signals the last item from the upstreamStreamableor the provideddefaultItemif the upstream is empty, as aSingleinstance.Signals the last item from the upstreamStreamableor aNoSuchElementExceptionif the upstream is empty, as aSingleinstance.default <@NonNull R>
@NonNull Streamable<R> This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns aStreamableinstance which when itsStreamable.stream(StreamerCancellation)is invoked, applies the specified operator callback to the upstreamStreamerto produce an actualStreamerinstance to be handed downstream.default <@NonNull R>
@NonNull Streamable<R> Maps each upstream item into another item via a mapper function.default <@NonNull R>
@NonNull Streamable<R> Maps each upstream item into another, optional item via a mapper function that skips the empty optionals.default @NonNull Streamable<T> onErrorResumeNext(@NonNull Function<? super Throwable, ? extends Streamable<? extends @NonNull T>> fallbackMapper) When the upstream fails, the sequence is resumed by theStreamablethat is returned for the failureThrowable.default @NonNull Streamable<T> skip(long count) Skips the firstcountitems and relays the rest to the downstream.stream(@NonNull StreamerCancellation cancellation) Realizes the stream and returns an interface that lets one consume it.default @NonNull CompletionStage<Void> subscribe(@NonNull StreamSink<? super @NonNull T> consumer) Relays the events of the upstream into aStreamSinkconsumer via the help of the standardExecutors.newVirtualThreadPerTaskExecutor()as a mediator for pull-to-push.default @NonNull CompletionStage<Void> subscribe(@NonNull StreamSink<? super @NonNull T> consumer, ExecutorService executor) Relays the events of the upstream into aStreamSinkconsumer via the help of the givenExecutorServiceas a mediator for pull-to-push.default voidsubscribe(Flow.Subscriber<? super @NonNull T> subscriber) Consume thisStreamablevia the given flow-reactive-streams subscriber on a virtual thread backed executor service.default voidsubscribe(Flow.Subscriber<? super @NonNull T> subscriber, @NonNull ExecutorService executor) Consume thisStreamablevia the given flow-reactive-streams subscriber.default @NonNull Streamable<T> take(long count) Takes at most the given number of items from the upstream and relays it to the downstream, then cancels the rest of the sequence.default <U> @NonNull Streamable<T> takeUntil(@NonNull Streamable<U> other) Relays items from thisStreamableuntil the otherStreamablesignals an item or completes.default @NonNull Streamable<T> Relays items from thisStreamablewhile the predicate returnstruedefault @NonNull TestSubscriber<T> test()Creates a newTestSubscriberand subscribes it to thisStreamable.default @NonNull TestSubscriber<T> test(@NonNull ExecutorService executor) Creates a newTestSubscriberand subscribes it to thisStreamable.default @NonNull Streamable<T> timeout(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Streamable<@NonNull T> fallback) Applies a timeout to each upstream item and switches to the fallbackStreamableif the upstream doesn't produce an item within the given timeout period.default <@NonNull R>
RCalls the specified converter function during assembly time and returns its resulting value.Converts the streamable into a Flowable representation, running on the default Executors.newVirtualThreadPerTaskExecutor() virtual thread.toFlowable(@NonNull ExecutorService executor) Converts thisStreamableinto aFlowablerepresentation, running on the provided executor service.default @NonNull Observable<T> Converts thisStreamableinto aObservablerepresentation, emitting items on whatever thread produces items in the currentStreamable.default <@NonNull R>
@NonNull Streamable<R> Transforms the upstream sequence into zero or more elements for the downstream.default <@NonNull R>
@NonNull Streamable<R> transform(@NonNull VirtualTransformer<@NonNull T, @NonNull R> transformer, @NonNull ExecutorService executor) Transforms the upstream sequence into zero or more elements for the downstream.
-
Constructor Details
-
GroupedStreamable
-
-
Method Details
-
getKey
-