Package rx.internal.operators
Class BlockingOperatorMostRecent
java.lang.Object
rx.internal.operators.BlockingOperatorMostRecent
Returns an Iterable that always returns the item most recently emitted by an Observable, or a
seed value if no item has yet been emitted.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterable
<T> mostRecent
(Observable<? extends T> source, T initialValue) Returns anIterable
that always returns the item most recently emitted by theObservable
.
-
Constructor Details
-
BlockingOperatorMostRecent
private BlockingOperatorMostRecent()
-
-
Method Details
-
mostRecent
Returns anIterable
that always returns the item most recently emitted by theObservable
.- Type Parameters:
T
- the value type- Parameters:
source
- the sourceObservable
initialValue
- a default item to return from theIterable
ifsource
has not yet emitted any items- Returns:
- an
Iterable
that always returns the item most recently emitted bysource
, orinitialValue
ifsource
has not yet emitted any items
-