@@ -2049,7 +2049,7 @@ public static <T> Flowable<T> fromPublisher(final Publisher<? extends T> publish
20492049 */
20502050 @BackpressureSupport(BackpressureKind.FULL)
20512051 @SchedulerSupport(SchedulerSupport.NONE)
2052- public static <T> Flowable<T> generate(final Consumer<Subscriber <T>> generator) {
2052+ public static <T> Flowable<T> generate(final Consumer<Emitter <T>> generator) {
20532053 ObjectHelper.requireNonNull(generator, "generator is null");
20542054 return generate(Functions.nullSupplier(),
20552055 FlowableInternalHelper.<T, Object>simpleGenerator(generator),
@@ -2077,7 +2077,7 @@ public static <T> Flowable<T> generate(final Consumer<Subscriber<T>> generator)
20772077 */
20782078 @BackpressureSupport(BackpressureKind.FULL)
20792079 @SchedulerSupport(SchedulerSupport.NONE)
2080- public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Subscriber <T>> generator) {
2080+ public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Emitter <T>> generator) {
20812081 ObjectHelper.requireNonNull(generator, "generator is null");
20822082 return generate(initialState, FlowableInternalHelper.<T, S>simpleBiGenerator(generator),
20832083 Functions.emptyConsumer());
@@ -2106,7 +2106,7 @@ public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiCons
21062106 */
21072107 @BackpressureSupport(BackpressureKind.FULL)
21082108 @SchedulerSupport(SchedulerSupport.NONE)
2109- public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Subscriber <T>> generator,
2109+ public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Emitter <T>> generator,
21102110 Consumer<? super S> disposeState) {
21112111 ObjectHelper.requireNonNull(generator, "generator is null");
21122112 return generate(initialState, FlowableInternalHelper.<T, S>simpleBiGenerator(generator),
@@ -2135,7 +2135,7 @@ public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiCons
21352135 */
21362136 @BackpressureSupport(BackpressureKind.FULL)
21372137 @SchedulerSupport(SchedulerSupport.NONE)
2138- public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Subscriber <T>, S> generator) {
2138+ public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter <T>, S> generator) {
21392139 return generate(initialState, generator, Functions.emptyConsumer());
21402140 }
21412141
@@ -2163,7 +2163,7 @@ public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S
21632163 */
21642164 @BackpressureSupport(BackpressureKind.FULL)
21652165 @SchedulerSupport(SchedulerSupport.NONE)
2166- public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Subscriber <T>, S> generator, Consumer<? super S> disposeState) {
2166+ public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter <T>, S> generator, Consumer<? super S> disposeState) {
21672167 ObjectHelper.requireNonNull(initialState, "initialState is null");
21682168 ObjectHelper.requireNonNull(generator, "generator is null");
21692169 ObjectHelper.requireNonNull(disposeState, "disposeState is null");
@@ -15446,22 +15446,21 @@ public final TestSubscriber<T> test(long initialRequest) { // NoPMD
1544615446 }
1544715447
1544815448 /**
15449- * Creates a TestSubscriber with the given initial request amount, fusion mode
15450- * and optionally in cancelled state, then subscribes it to this Flowable.
15449+ * Creates a TestSubscriber with the given initial request amount,
15450+ * optionally cancels it before the subscription and subscribes
15451+ * it to this Flowable.
1545115452 * @param initialRequest the initial request amount, positive
15452- * @param fusionMode the requested fusion mode, see {@link QueueSubscription} constants.
15453- * @param cancelled if true, the TestSubscriber will be cancelled before subscribing to this
15454- * Flowable.
15453+ * @param cancel should the TestSubscriber be cancelled before the subscription?
1545515454 * @return the new TestSubscriber instance
1545615455 * @since 2.0
1545715456 */
15458- public final TestSubscriber<T> test(long initialRequest, int fusionMode, boolean cancelled ) { // NoPMD
15457+ public final TestSubscriber<T> test(long initialRequest, boolean cancel ) { // NoPMD
1545915458 TestSubscriber<T> ts = new TestSubscriber<T>(initialRequest);
15460- ts.setInitialFusionMode(fusionMode);
15461- if (cancelled) {
15459+ if (cancel) {
1546215460 ts.cancel();
1546315461 }
1546415462 subscribe(ts);
1546515463 return ts;
1546615464 }
15465+
1546715466}
0 commit comments