Class BlockingOperatorMostRecent



  • public final class BlockingOperatorMostRecent
    extends 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.

    • Method Detail

      • mostRecent

        public static <T> Iterable<T> mostRecent(Observable<? extends T> source,
                                                 T initialValue)
        Returns an Iterable that always returns the item most recently emitted by the Observable.
        Parameters:
        source - the source Observable
        initialValue - a default item to return from the Iterable if source has not yet emitted any items
        Returns:
        an Iterable that always returns the item most recently emitted by source, or initialValue if source has not yet emitted any items