Top Inners Fields Constructors Methods
io.reactivex.internal.operators.observable

public final Class ObservableGenerate<T, S>

extends Observable<T>
Class Inheritance
Imports
java.util.concurrent.Callable, io.reactivex.*, io.reactivex.disposables.Disposable, io.reactivex.exceptions.Exceptions, io.reactivex.functions.*, io.reactivex.internal.disposables.EmptyDisposable, io.reactivex.plugins.RxJavaPlugins

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final Consumer<? super S>
pack-priv final BiFunction<S, Emitter<T>, S>
pack-priv final Callable<S>

Constructor Summary

AccessConstructor and Description
public
ObservableGenerate(Callable<S> stateSupplier, BiFunction<S, Emitter<T>, S> generator, Consumer<? super S> disposeState)

Method Summary

Modifier and TypeMethod and Description
public void
subscribeActual(Observer<? super T>
the incoming Observer, never null
observer
)

Implements abstract io.reactivex.Observable.subscribeActual.

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

Field Detail

disposeStateback to summary
pack-priv final Consumer<? super S> disposeState
generatorback to summary
pack-priv final BiFunction<S, Emitter<T>, S> generator
stateSupplierback to summary
pack-priv final Callable<S> stateSupplier

Constructor Detail

ObservableGenerateback to summary
public ObservableGenerate(Callable<S> stateSupplier, BiFunction<S, Emitter<T>, S> generator, Consumer<? super S> disposeState)

Method Detail

subscribeActualback to summary
public void subscribeActual(Observer<? super T> observer)

Implements abstract io.reactivex.Observable.subscribeActual.

Doc from io.reactivex.Observable.subscribeActual.

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

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

Parameters
observer:Observer<? super T>

the incoming Observer, never null

Annotations
@Override
io.reactivex.internal.operators.observable back to summary

pack-priv final Class ObservableGenerate.GeneratorDisposable<T, S>

extends Object
implements Emitter<T>, Disposable
Class Inheritance
  • java.lang.Object
  • io.reactivex.internal.operators.observable.ObservableGenerate.GeneratorDisposable
All Implemented Interfaces
io.reactivex.disposables.Disposable, io.reactivex.Emitter

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv final Consumer<? super S>
pack-priv final Observer<? super T>
pack-priv final BiFunction<S, ? super Emitter<T>, S>
pack-priv boolean
pack-priv S
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv
GeneratorDisposable(Observer<? super T> actual, BiFunction<S, ? super Emitter<T>, S> generator, Consumer<? super S> disposeState, S initialState)

Method Summary

Modifier and TypeMethod and Description
private void
dispose(S s)

public void
dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public boolean
isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public void
onComplete()

Implements io.reactivex.Emitter.onComplete.

Signal a completion.
public void
onError(Throwable
the Throwable to signal, not null
t
)

Implements io.reactivex.Emitter.onError.

Signal a Throwable exception.
public void
onNext(T
the value to signal, not null
t
)

Implements io.reactivex.Emitter.onNext.

Signal a normal value.
public void
run()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancelledback to summary
pack-priv volatile boolean cancelled
disposeStateback to summary
pack-priv final Consumer<? super S> disposeState
downstreamback to summary
pack-priv final Observer<? super T> downstream
generatorback to summary
pack-priv final BiFunction<S, ? super Emitter<T>, S> generator
hasNextback to summary
pack-priv boolean hasNext
stateback to summary
pack-priv S state
terminateback to summary
pack-priv boolean terminate

Constructor Detail

GeneratorDisposableback to summary
pack-priv GeneratorDisposable(Observer<? super T> actual, BiFunction<S, ? super Emitter<T>, S> generator, Consumer<? super S> disposeState, S initialState)

Method Detail

disposeback to summary
private void dispose(S s)
disposeback to summary
public void dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Doc from io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Doc from io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements io.reactivex.Emitter.onComplete.

Doc from io.reactivex.Emitter.onComplete.

Signal a completion.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements io.reactivex.Emitter.onError.

Doc from io.reactivex.Emitter.onError.

Signal a Throwable exception.

Parameters
t:Throwable

the Throwable to signal, not null

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements io.reactivex.Emitter.onNext.

Doc from io.reactivex.Emitter.onNext.

Signal a normal value.

Parameters
t:T

the value to signal, not null

Annotations
@Override
runback to summary
public void run()