Package rx.internal.operators
Class OperatorSwitch<T>
java.lang.Object
rx.internal.operators.OperatorSwitch<T>
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
Func1<Subscriber<? super T>,
,Subscriber<? super Observable<? extends T>>> Function
,Observable.Operator<T,
Observable<? extends T>>
public final class OperatorSwitch<T>
extends Object
implements Observable.Operator<T,Observable<? extends T>>
Transforms an Observable that emits Observables into a single Observable that
emits the items emitted by the most recently published of those Observables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Lazy initialization via inner-class holder.(package private) static final class
Lazy initialization via inner-class holder.(package private) static final class
(package private) static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSubscriber
<? super Observable<? extends T>> call
(Subscriber<? super T> child) static <T> OperatorSwitch
<T> instance
(boolean delayError) Returns a singleton instance of the operator based on the delayError parameter.
-
Field Details
-
delayError
final boolean delayError
-
-
Constructor Details
-
OperatorSwitch
OperatorSwitch(boolean delayError)
-
-
Method Details
-
instance
Returns a singleton instance of the operator based on the delayError parameter.- Type Parameters:
T
- the value type- Parameters:
delayError
- should the errors of the inner sources delayed until the main sequence completes?- Returns:
- a singleton instance of this stateless operator.
-
call
- Specified by:
call
in interfaceFunc1<Subscriber<? super T>,
Subscriber<? super Observable<? extends T>>>
-