/** * Buffers the elements into continuous, non-overlapping Lists where the * boundary is determined by a predicate receiving each item, after being * buffered, and returns true to indicate a new buffer should start. * * <p> * The operator won't return an empty first or last buffer. * * <dl> * <dt><b>Backpressure Support:</b></dt> * <dd>This operator supports backpressure.</dd> * <dt><b>Scheduler:</b></dt> * <dd>This operator does not operate by default on a particular * {@link Scheduler}.</dd> * </dl> * * @param <T> * the input value type * @param predicate * the Func1 that receives each item, after being buffered, and * should return true to indicate a new buffer has to start. * @return the new Observable instance * @see #bufferWhile(Func1) * @since (if this graduates from Experimental/Beta to supported, replace * this parenthetical with the release number) */ public static final <T> Transformer<T, List<T>> bufferUntil( Func1<? super T, Boolean> predicate) { return bufferUntil(predicate, 10); }
return bufferUntil(predicate, capacityHint);
/** * Buffers the elements into continuous, non-overlapping Lists where the * boundary is determined by a predicate receiving each item, after being * buffered, and returns true to indicate a new buffer should start. * * <p> * The operator won't return an empty first or last buffer. * * <dl> * <dt><b>Backpressure Support:</b></dt> * <dd>This operator supports backpressure.</dd> * <dt><b>Scheduler:</b></dt> * <dd>This operator does not operate by default on a particular * {@link Scheduler}.</dd> * </dl> * * @param <T> * the input value type * @param predicate * the Func1 that receives each item, after being buffered, and * should return true to indicate a new buffer has to start. * @return the new Observable instance * @see #bufferWhile(Func1) * @since (if this graduates from Experimental/Beta to supported, replace * this parenthetical with the release number) */ public static final <T> Transformer<T, List<T>> bufferUntil( Func1<? super T, Boolean> predicate) { return bufferUntil(predicate, 10); }
/** * Buffers the elements into continuous, non-overlapping Lists where the * boundary is determined by a predicate receiving each item, after being * buffered, and returns true to indicate a new buffer should start. * * <p> * The operator won't return an empty first or last buffer. * * <dl> * <dt><b>Backpressure Support:</b></dt> * <dd>This operator supports backpressure.</dd> * <dt><b>Scheduler:</b></dt> * <dd>This operator does not operate by default on a particular * {@link Scheduler}.</dd> * </dl> * * @param <T> * the input value type * @param predicate * the Func1 that receives each item, after being buffered, and * should return true to indicate a new buffer has to start. * @return the new Observable instance * @see #bufferWhile(Func1) * @since (if this graduates from Experimental/Beta to supported, replace * this parenthetical with the release number) */ public static final <T> Transformer<T, List<T>> toListUntil( Func1<? super T, Boolean> predicate) { return bufferUntil(predicate); }
/** * Buffers the elements into continuous, non-overlapping Lists where the * boundary is determined by a predicate receiving each item, after being * buffered, and returns true to indicate a new buffer should start. * * <p> * The operator won't return an empty first or last buffer. * * <dl> * <dt><b>Backpressure Support:</b></dt> * <dd>This operator supports backpressure.</dd> * <dt><b>Scheduler:</b></dt> * <dd>This operator does not operate by default on a particular * {@link Scheduler}.</dd> * </dl> * * @param <T> * the input value type * @param predicate * the Func1 that receives each item, after being buffered, and * should return true to indicate a new buffer has to start. * @return the new Observable instance * @see #bufferWhile(Func1) * @since (if this graduates from Experimental/Beta to supported, replace * this parenthetical with the release number) */ public static final <T> Transformer<T, List<T>> toListUntil( Func1<? super T, Boolean> predicate) { return bufferUntil(predicate); }
return bufferUntil(predicate, capacityHint);