@Test public void testMostRecentNull() { assertEquals(null, Observable.<Void>never().toBlocking().mostRecent(null).iterator().next()); }
public static <T> Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue) { return new Iterable<T>() { @Override public Iterator<T> iterator() { MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue); source.subscribe(mostRecentObserver); return mostRecentObserver.getIterable(); } }; }
BlockingOperatorMostRecent { public static <T> Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue) { return new Iterable<T>() { @Override public Iterator<T> iterator() { MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue); source.subscribe(mostRecentObserver); return mostRecentObserver.getIterable(); } }; } }
BlockingOperatorMostRecent { public static <T> Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue) { return new Iterable<T>() { @Override public Iterator<T> iterator() { MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue); source.subscribe(mostRecentObserver); return mostRecentObserver.getIterable(); } }; } private  BlockingOperatorMostRecent(); }
BlockingOperatorMostRecent { public static <T> Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue) { return new Iterable<T>() { @Override public Iterator<T> iterator() { MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue); source.subscribe(mostRecentObserver); return mostRecentObserver.getIterable(); } }; } private  BlockingOperatorMostRecent(); static Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue); }
BlockingOperatorMostRecent { public static <T> Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue) { return new Iterable<T>() { @Override public Iterator<T> iterator() { MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue); source.subscribe(mostRecentObserver); return mostRecentObserver.getIterable(); } }; } private  BlockingOperatorMostRecent(); static Iterable<T> mostRecent(final Observable<? extends T> source, final T initialValue);  }