@Test public void testAnyWithPredicate2() { Observable<Integer> w = Observable.from(1, 2, 3); Observable<Boolean> observable = Observable.create(any(w, new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 < 1; } })); @SuppressWarnings("unchecked") Observer<Boolean> observer = mock(Observer.class); observable.subscribe(observer); verify(observer, times(1)).onNext(false); verify(observer, never()).onNext(true); verify(observer, never()).onError(org.mockito.Matchers.any(Throwable.class)); verify(observer, times(1)).onCompleted(); }
public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) { return new Any<T>(source, alwaysTrue(), false); }
OperationAny { public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) { return new Any<T>(source, alwaysTrue(), false); } }
OperationAny { public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) { return new Any<T>(source, alwaysTrue(), false); }  }
OperationAny { public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) { return new Any<T>(source, alwaysTrue(), false); }  static OnSubscribeFunc<Boolean> any(Observable<? extends T> source); static OnSubscribeFunc<Boolean> isEmpty(Observable<? extends T> source); static OnSubscribeFunc<Boolean> any(Observable<? extends T> source, Func1<? super T, Boolean> predicate); static OnSubscribeFunc<Boolean> exists(Observable<? extends T> source, Func1<? super T, Boolean> predicate); }
OperationAny { public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) { return new Any<T>(source, alwaysTrue(), false); }  static OnSubscribeFunc<Boolean> any(Observable<? extends T> source); static OnSubscribeFunc<Boolean> isEmpty(Observable<? extends T> source); static OnSubscribeFunc<Boolean> any(Observable<? extends T> source, Func1<? super T, Boolean> predicate); static OnSubscribeFunc<Boolean> exists(Observable<? extends T> source, Func1<? super T, Boolean> predicate);  }