@Test public void testWhileDoManyTimes() { Observable<Integer> source1 = Observable.from(1, 2, 3).subscribeOn(Schedulers.currentThread()); List<Integer> expected = new ArrayList<Integer>(numRecursion * 3); for (int i = 0; i < numRecursion; i++) { expected.add(1); expected.add(2); expected.add(3); } Observable<Integer> result = Statement.whileDo(source1, countdown(numRecursion)); observeSequence(result, expected); }
public static <T> OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition) { return new WhileDoWhile<T>(source, preCondition, preCondition); }
OperationConditionals { public static <T> OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition) { return new WhileDoWhile<T>(source, preCondition, preCondition); } }
OperationConditionals { public static <T> OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition) { return new WhileDoWhile<T>(source, preCondition, preCondition); } private  OperationConditionals(); }
OperationConditionals { public static <T> OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition) { return new WhileDoWhile<T>(source, preCondition, preCondition); } private  OperationConditionals(); static OnSubscribeFunc<R> switchCase(
            Func0<? extends K> caseSelector,
            Map<? super K, ? extends Observable<? extends R>> mapOfCases,
            Observable<? extends R> defaultCase); static OnSubscribeFunc<R> ifThen(
            Func0<Boolean> condition,
            Observable<? extends R> then,
            Observable<? extends R> orElse); static OnSubscribeFunc<T> doWhile(Observable<? extends T> source, Func0<Boolean> postCondition); static OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition); }
OperationConditionals { public static <T> OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition) { return new WhileDoWhile<T>(source, preCondition, preCondition); } private  OperationConditionals(); static OnSubscribeFunc<R> switchCase(
            Func0<? extends K> caseSelector,
            Map<? super K, ? extends Observable<? extends R>> mapOfCases,
            Observable<? extends R> defaultCase); static OnSubscribeFunc<R> ifThen(
            Func0<Boolean> condition,
            Observable<? extends R> then,
            Observable<? extends R> orElse); static OnSubscribeFunc<T> doWhile(Observable<? extends T> source, Func0<Boolean> postCondition); static OnSubscribeFunc<T> whileDo(Observable<? extends T> source, Func0<Boolean> preCondition);  }