Class 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.

    • 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 an Iterable that always returns the item most recently emitted by the Observable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlockingOperatorMostRecent

        private BlockingOperatorMostRecent()
    • Method Detail

      • mostRecent

        public static <T> java.lang.Iterable<T> mostRecent​(Observable<? extends T> source,
                                                           T initialValue)
        Returns an Iterable that always returns the item most recently emitted by the Observable.
        Type Parameters:
        T - the value type
        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