Top Description Inners Constructors Methods
io.reactivex.internal.operators.flowable

public final Class FlowableScalarXMap

extends Object
Class Inheritance
Imports
java.util.concurrent.Callable, org.reactivestreams.*, io.reactivex.Flowable, io.reactivex.exceptions.Exceptions, io.reactivex.functions.Function, io.reactivex.internal.functions.ObjectHelper, io.reactivex.internal.subscriptions.*, io.reactivex.plugins.RxJavaPlugins

Utility classes to work with scalar-sourced XMap operators (where X == { flat, concat, switch }).

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
FlowableScalarXMap.ScalarXMapFlowable<
the scalar value type
T
,
the mapped Publisher's element type.
R
>

Maps a scalar value to a Publisher and subscribes to it.

Constructor Summary

AccessConstructor and Description
private
FlowableScalarXMap()

Utility class.

Method Summary

Modifier and TypeMethod and Description
public static <
the scalar value type
T
,
the output value type
U
>
Flowable<U>

Returns:

the new Flowable instance
scalarXMap
(final T
the scalar value to map
value
,
final Function<? super T, ? extends Publisher<? extends U>>
the function that gets the scalar value and should return a Publisher that gets streamed
mapper
)

Maps a scalar value into a Publisher and emits its values.

public static <
the input value type
T
,
the output value type
R
>
boolean

Returns:

true if successful, false if the caller should continue with the regular path.
tryScalarXMapSubscribe
(Publisher<T>
the source Publisher
source
,
Subscriber<? super R>
the subscriber
subscriber
,
Function<? super T, ? extends Publisher<? extends R>>
the function mapping a scalar value into a Publisher
mapper
)

Tries to subscribe to a possibly Callable source's mapped Publisher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FlowableScalarXMapback to summary
private FlowableScalarXMap()

Utility class.

Method Detail

scalarXMapback to summary
public static <T, U> Flowable<U> scalarXMap(final T value, final Function<? super T, ? extends Publisher<? extends U>> mapper)

Maps a scalar value into a Publisher and emits its values.

Parameters
<T>
the scalar value type
<U>
the output value type
value:T

the scalar value to map

mapper:Function<? super T, ? extends Publisher<? extends U>>

the function that gets the scalar value and should return a Publisher that gets streamed

Returns:Flowable<U>

the new Flowable instance

tryScalarXMapSubscribeback to summary
public static <T, R> boolean tryScalarXMapSubscribe(Publisher<T> source, Subscriber<? super R> subscriber, Function<? super T, ? extends Publisher<? extends R>> mapper)

Tries to subscribe to a possibly Callable source's mapped Publisher.

Parameters
<T>
the input value type
<R>
the output value type
source:Publisher<T>

the source Publisher

subscriber:Subscriber<? super R>

the subscriber

mapper:Function<? super T, ? extends Publisher<? extends R>>

the function mapping a scalar value into a Publisher

Returns:boolean

true if successful, false if the caller should continue with the regular path.

Annotations
@SuppressWarnings:unchecked
io.reactivex.internal.operators.flowable back to summary

pack-priv final Class FlowableScalarXMap.ScalarXMapFlowable<T, R>

extends Flowable<R>
Class Inheritance
Type Parameters
<T>
the scalar value type
<R>
the mapped Publisher's element type.

Maps a scalar value to a Publisher and subscribes to it.

Field Summary

Modifier and TypeField and Description
pack-priv final Function<? super T, ? extends Publisher<? extends R>>
pack-priv final T

Constructor Summary

AccessConstructor and Description
pack-priv
ScalarXMapFlowable(T value, Function<? super T, ? extends Publisher<? extends R>> mapper)

Method Summary

Modifier and TypeMethod and Description
public void
subscribeActual(Subscriber<? super R>
the incoming Subscriber, never null
s
)

Implements abstract io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.
Inherited from io.reactivex.Flowable:
allambambArrayambWithanyasblockingFirstblockingFirstblockingForEachblockingIterableblockingIterableblockingLastblockingLastblockingLatestblockingMostRecentblockingNextblockingSingleblockingSingleblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribebufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferSizecachecacheWithInitialCapacitycastcollectcollectIntocombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcomposeconcatconcatconcatconcatconcatconcatconcatArrayconcatArrayDelayErrorconcatArrayEagerconcatArrayEagerconcatArrayEagerDelayErrorconcatArrayEagerDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatEagerconcatEagerconcatEagerconcatEagerconcatMapconcatMapconcatMapCompletableconcatMapCompletableconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapEagerconcatMapEagerconcatMapEagerDelayErrorconcatMapEagerDelayErrorconcatMapIterableconcatMapIterableconcatMapMaybeconcatMapMaybeconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapSingleconcatMapSingleconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatWithconcatWithconcatWithconcatWithcontainscountcreatedebouncedebouncedebouncedefaultIfEmptydeferdelaydelaydelaydelaydelaydelaydelaySubscriptiondelaySubscriptiondelaySubscriptiondematerializedematerializedistinctdistinctdistinctdistinctUntilChangeddistinctUntilChangeddistinctUntilChangeddoAfterNextdoAfterTerminatedoFinallydoOnCanceldoOnCompletedoOnEachdoOnEachdoOnErrordoOnLifecycledoOnNextdoOnRequestdoOnSubscribedoOnTerminateelementAtelementAtelementAtOrErroremptyerrorerrorfilterfirstfirstElementfirstOrErrorflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapCompletableflatMapCompletableflatMapIterableflatMapIterableflatMapIterableflatMapIterableflatMapMaybeflatMapMaybeflatMapSingleflatMapSingleforEachforEachWhileforEachWhileforEachWhilefromArrayfromCallablefromFuturefromFuturefromFuturefromFuturefromIterablefromPublishergenerategenerategenerategenerategenerategroupBygroupBygroupBygroupBygroupBygroupBygroupJoinhideignoreElementsintervalintervalintervalintervalintervalRangeintervalRangeisEmptyjoinjustjustjustjustjustjustjustjustjustjustlastlastElementlastOrErrorliftlimitmapmaterializemergemergemergemergemergemergemergemergemergeArraymergeArraymergeArrayDelayErrormergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithmergeWithmergeWithmergeWithneverobserveOnobserveOnobserveOnofTypeonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureDroponBackpressureDroponBackpressureLatestonErrorResumeNextonErrorResumeNextonErrorReturnonErrorReturnItemonExceptionResumeNextonTerminateDetachparallelparallelparallelpublishpublishpublishpublishrangerangeLongrebatchRequestsreducereducereduceWithrepeatrepeatrepeatUntilrepeatWhenreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayretryretryretryretryretryretryUntilretryWhensafeSubscribesamplesamplesamplesamplesamplesamplescanscanscanWithsequenceEqualsequenceEqualsequenceEqualsequenceEqualserializesharesinglesingleElementsingleOrErrorskipskipskipskipLastskipLastskipLastskipLastskipLastskipLastskipUntilskipWhilesortedsortedstartWithstartWithstartWithstartWithArraysubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeOnsubscribeWithswitchIfEmptyswitchMapswitchMapswitchMapCompletableswitchMapCompletableDelayErrorswitchMapDelayErrorswitchMapDelayErrorswitchMapMaybeswitchMapMaybeDelayErrorswitchMapSingleswitchMapSingleDelayErrorswitchOnNextswitchOnNextswitchOnNextDelayErrorswitchOnNextDelayErrortaketaketaketakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeUntiltakeUntiltakeWhiletesttesttestthrottleFirstthrottleFirstthrottleLastthrottleLastthrottleLatestthrottleLatestthrottleLatestthrottleLatestthrottleWithTimeoutthrottleWithTimeouttimeIntervaltimeIntervaltimeIntervaltimeIntervaltimeouttimeouttimeouttimeouttimeouttimeouttimeouttimeouttimertimertimestamptimestamptimestamptimestamptotoFuturetoListtoListtoListtoMaptoMaptoMaptoMultimaptoMultimaptoMultimaptoMultimaptoObservabletoSortedListtoSortedListtoSortedListtoSortedListunsafeCreateunsubscribeOnusingusingwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromzipzipzipzipzipzipzipzipzipzipzipzipzipArrayzipIterablezipWithzipWithzipWithzipWith

Field Detail

mapperback to summary
pack-priv final Function<? super T, ? extends Publisher<? extends R>> mapper
valueback to summary
pack-priv final T value

Constructor Detail

ScalarXMapFlowableback to summary
pack-priv ScalarXMapFlowable(T value, Function<? super T, ? extends Publisher<? extends R>> mapper)

Method Detail

subscribeActualback to summary
public void subscribeActual(Subscriber<? super R> s)

Implements abstract io.reactivex.Flowable.subscribeActual.

Doc from io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.

There is no need to call any of the plugin hooks on the current Flowable instance or the Subscriber; all hooks and basic safeguards have been applied by subscribe(Subscriber) before this method gets called.

Parameters
s:Subscriber<? super R>

the incoming Subscriber, never null

Annotations
@SuppressWarnings:unchecked
@Override