Class BlockingOperatorMostRecent

java.lang.Object
rx.internal.operators.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.

  • Constructor Details

    • BlockingOperatorMostRecent

      private BlockingOperatorMostRecent()
  • Method Details

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