T
- the input and output value typepublic final class PerhapsProcessor<T> extends Perhaps<T> implements Processor<T,T>
Calling the onNext multiple times has no effect.
Modifier and Type | Method and Description |
---|---|
static <T> PerhapsProcessor<T> |
create()
Creates a fresh PerhapsProcessor instance.
|
Throwable |
getThrowable()
Returns the received onError Throwable if hasThrowable() is true, null otherwise.
|
T |
getValue()
Returns the received onNext value if hasValue() is true, null otherwise.
|
boolean |
hasComplete()
Returns true if this PerhapsProcessor completed without any value.
|
boolean |
hasSubscribers()
Returns true if this Processor has Subscribers.
|
boolean |
hasThrowable()
Returns true if this PerhapsProcessor received an onError Throwable.
|
boolean |
hasValue()
Returns true if this PerhapsProcessor received an onNext value.
|
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(Subscription s) |
protected void |
subscribeActual(Subscriber<? super T> s)
Implement this method to react to a Subscriber subscribing to this Perhaps.
|
amb, ambArray, ambWith, andThen, andThen, blockingGet, blockingGet, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, cache, compose, concat, concat, concat, concatArray, concatArrayDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatWith, create, defaultIfEmpty, defer, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, doAfterNext, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnError, doOnNext, doOnRequest, doOnSubscribe, empty, error, error, filter, flatMap, flatMap, flatMapPublisher, fromAction, fromCallable, fromCompletable, fromFuture, fromFuture, fromMaybe, fromPublisher, fromSingle, getOnAssemblyHandler, hide, ignoreElement, just, lift, map, mapError, merge, merge, merge, merge, mergeArray, mergeArray, mergeArrayDelayError, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, never, observeOn, onAssembly, onErrorComplete, onErrorResumeNext, onErrorResumeWith, onErrorReturnItem, repeat, repeat, repeat, repeatWhen, retry, retry, retry, retryWhen, setOnAssemblyHandler, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchIfEmpty, takeUntil, test, test, test, test, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, to, toFlowable, toFuture, toMaybe, toObservable, unsubscribeOn, using, using, zip, zipArray, zipWith
public static <T> PerhapsProcessor<T> create()
T
- the input and output value typeprotected void subscribeActual(Subscriber<? super T> s)
Perhaps
subscribeActual
in class Perhaps<T>
s
- the downstream Subscriber, never nullpublic void onSubscribe(Subscription s)
onSubscribe
in interface Subscriber<T>
public void onNext(T t)
onNext
in interface Subscriber<T>
public void onError(Throwable t)
onError
in interface Subscriber<T>
public void onComplete()
onComplete
in interface Subscriber<T>
public boolean hasSubscribers()
public boolean hasValue()
public T getValue()
public boolean hasThrowable()
public Throwable getThrowable()
public boolean hasComplete()