Package rx.internal.operators
Class BlockingOperatorMostRecent
- java.lang.Object
-
- rx.internal.operators.BlockingOperatorMostRecent
-
public final class BlockingOperatorMostRecent extends java.lang.Object
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 Classes Modifier and Type Class Description (package private) static class
BlockingOperatorMostRecent.MostRecentObserver<T>
-
Constructor Summary
Constructors Modifier Constructor Description private
BlockingOperatorMostRecent()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.Iterable<T>
mostRecent(Observable<? extends T> source, T initialValue)
Returns anIterable
that always returns the item most recently emitted by theObservable
.
-
-
-
Method Detail
-
mostRecent
public static <T> java.lang.Iterable<T> mostRecent(Observable<? extends T> source, T initialValue)
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
-
-