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 java.lang.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 Classes Modifier and Type Class Description (package private) static class
OperatorSwitch.Holder
Lazy initialization via inner-class holder.(package private) static class
OperatorSwitch.HolderDelayError
Lazy initialization via inner-class holder.(package private) static class
OperatorSwitch.InnerSubscriber<T>
(package private) static class
OperatorSwitch.SwitchSubscriber<T>
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
delayError
-
Constructor Summary
Constructors Constructor Description OperatorSwitch(boolean delayError)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber<? 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.
-
-
-
Method Detail
-
instance
public static <T> OperatorSwitch<T> instance(boolean delayError)
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
public Subscriber<? super Observable<? extends T>> call(Subscriber<? super T> child)
- Specified by:
call
in interfaceFunc1<Subscriber<? super T>,Subscriber<? super Observable<? extends T>>>
-
-