1818
1919import org .reactivestreams .*;
2020
21- import io .reactivex .NbpObservable .*;
21+ import io .reactivex .Observable .*;
2222import io .reactivex .Single .*;
2323import io .reactivex .annotations .*;
2424import io .reactivex .disposables .*;
@@ -353,7 +353,7 @@ public static Completable concat(Iterable<? extends Completable> sources) {
353353 * @throws NullPointerException if sources is null
354354 */
355355 @ SchedulerSupport (SchedulerKind .NONE )
356- public static Completable concat (Observable <? extends Completable > sources ) {
356+ public static Completable concat (Flowable <? extends Completable > sources ) {
357357 return concat (sources , 2 );
358358 }
359359
@@ -365,7 +365,7 @@ public static Completable concat(Observable<? extends Completable> sources) {
365365 * @throws NullPointerException if sources is null
366366 */
367367 @ SchedulerSupport (SchedulerKind .NONE )
368- public static Completable concat (Observable <? extends Completable > sources , int prefetch ) {
368+ public static Completable concat (Flowable <? extends Completable > sources , int prefetch ) {
369369 Objects .requireNonNull (sources , "sources is null" );
370370 if (prefetch < 1 ) {
371371 throw new IllegalArgumentException ("prefetch > 0 required but it was " + prefetch );
@@ -517,7 +517,7 @@ public void accept(CompletableSubscriber s) {
517517 * @throws NullPointerException if flowable is null
518518 */
519519 @ SchedulerSupport (SchedulerKind .NONE )
520- public static <T > Completable fromFlowable (final Observable <T > flowable ) {
520+ public static <T > Completable fromFlowable (final Flowable <T > flowable ) {
521521 Objects .requireNonNull (flowable , "flowable is null" );
522522 return create (new CompletableOnSubscribe () {
523523 @ Override
@@ -559,12 +559,12 @@ public void onSubscribe(Subscription s) {
559559 * @throws NullPointerException if flowable is null
560560 */
561561 @ SchedulerSupport (SchedulerKind .NONE )
562- public static <T > Completable fromNbpObservable (final NbpObservable <T > observable ) {
562+ public static <T > Completable fromNbpObservable (final Observable <T > observable ) {
563563 Objects .requireNonNull (observable , "observable is null" );
564564 return create (new CompletableOnSubscribe () {
565565 @ Override
566566 public void accept (final CompletableSubscriber s ) {
567- observable .subscribe (new NbpSubscriber <T >() {
567+ observable .subscribe (new Observer <T >() {
568568
569569 @ Override
570570 public void onComplete () {
@@ -695,7 +695,7 @@ public static Completable merge(Iterable<? extends Completable> sources) {
695695 * @return the new Completable instance
696696 * @throws NullPointerException if sources is null
697697 */
698- public static Completable merge (Observable <? extends Completable > sources ) {
698+ public static Completable merge (Flowable <? extends Completable > sources ) {
699699 return merge0 (sources , Integer .MAX_VALUE , false );
700700 }
701701
@@ -708,7 +708,7 @@ public static Completable merge(Observable<? extends Completable> sources) {
708708 * @throws NullPointerException if sources is null
709709 * @throws IllegalArgumentException if maxConcurrency is less than 1
710710 */
711- public static Completable merge (Observable <? extends Completable > sources , int maxConcurrency ) {
711+ public static Completable merge (Flowable <? extends Completable > sources , int maxConcurrency ) {
712712 return merge0 (sources , maxConcurrency , false );
713713
714714 }
@@ -724,7 +724,7 @@ public static Completable merge(Observable<? extends Completable> sources, int m
724724 * @throws NullPointerException if sources is null
725725 * @throws IllegalArgumentException if maxConcurrency is less than 1
726726 */
727- protected static Completable merge0 (Observable <? extends Completable > sources , int maxConcurrency , boolean delayErrors ) {
727+ protected static Completable merge0 (Flowable <? extends Completable > sources , int maxConcurrency , boolean delayErrors ) {
728728 Objects .requireNonNull (sources , "sources is null" );
729729 if (maxConcurrency < 1 ) {
730730 throw new IllegalArgumentException ("maxConcurrency > 0 required but it was " + maxConcurrency );
@@ -767,7 +767,7 @@ public static Completable mergeDelayError(Iterable<? extends Completable> source
767767 * @return the new Completable instance
768768 * @throws NullPointerException if sources is null
769769 */
770- public static Completable mergeDelayError (Observable <? extends Completable > sources ) {
770+ public static Completable mergeDelayError (Flowable <? extends Completable > sources ) {
771771 return merge0 (sources , Integer .MAX_VALUE , true );
772772 }
773773
@@ -781,7 +781,7 @@ public static Completable mergeDelayError(Observable<? extends Completable> sour
781781 * @return the new Completable instance
782782 * @throws NullPointerException if sources is null
783783 */
784- public static Completable mergeDelayError (Observable <? extends Completable > sources , int maxConcurrency ) {
784+ public static Completable mergeDelayError (Flowable <? extends Completable > sources , int maxConcurrency ) {
785785 return merge0 (sources , maxConcurrency , true );
786786 }
787787
@@ -1390,7 +1390,7 @@ public final Completable endWith(Completable other) {
13901390 * @throws NullPointerException if next is null
13911391 */
13921392 @ SchedulerSupport (SchedulerKind .CUSTOM )
1393- public final <T > NbpObservable <T > endWith (NbpObservable <T > next ) {
1393+ public final <T > Observable <T > endWith (Observable <T > next ) {
13941394 return next .startWith (this .<T >toNbpObservable ());
13951395 }
13961396
@@ -1403,7 +1403,7 @@ public final <T> NbpObservable<T> endWith(NbpObservable<T> next) {
14031403 * @throws NullPointerException if next is null
14041404 */
14051405 @ SchedulerSupport (SchedulerKind .CUSTOM )
1406- public final <T > Observable <T > endWith (Observable <T > next ) {
1406+ public final <T > Flowable <T > endWith (Flowable <T > next ) {
14071407 return next .startWith (this .<T >toFlowable ());
14081408 }
14091409
@@ -1787,7 +1787,7 @@ public final Completable repeatUntil(BooleanSupplier stop) {
17871787 * FIXME the Observable<Void> type doesn't make sense here because nulls are not allowed
17881788 * FIXME add unit test once the type has been fixed
17891789 */
1790- public final Completable repeatWhen (Function <? super Observable <Object >, ? extends Publisher <Object >> handler ) {
1790+ public final Completable repeatWhen (Function <? super Flowable <Object >, ? extends Publisher <Object >> handler ) {
17911791 return fromFlowable (toFlowable ().repeatWhen (handler ));
17921792 }
17931793
@@ -1847,7 +1847,7 @@ public final Completable retry(Predicate<? super Throwable> predicate) {
18471847 * @throws NullPointerException if handler is null
18481848 */
18491849 @ SchedulerSupport (SchedulerKind .NONE )
1850- public final Completable retryWhen (Function <? super Observable <? extends Throwable >, ? extends Publisher <Object >> handler ) {
1850+ public final Completable retryWhen (Function <? super Flowable <? extends Throwable >, ? extends Publisher <Object >> handler ) {
18511851 return fromFlowable (toFlowable ().retryWhen (handler ));
18521852 }
18531853
@@ -1873,7 +1873,7 @@ public final Completable startWith(Completable other) {
18731873 * @throws NullPointerException if other is null
18741874 */
18751875 @ SchedulerSupport (SchedulerKind .NONE )
1876- public final <T > NbpObservable <T > startWith (NbpObservable <T > other ) {
1876+ public final <T > Observable <T > startWith (Observable <T > other ) {
18771877 Objects .requireNonNull (other , "other is null" );
18781878 return other .endWith (this .<T >toNbpObservable ());
18791879 }
@@ -1886,7 +1886,7 @@ public final <T> NbpObservable<T> startWith(NbpObservable<T> other) {
18861886 * @throws NullPointerException if other is null
18871887 */
18881888 @ SchedulerSupport (SchedulerKind .NONE )
1889- public final <T > Observable <T > startWith (Observable <T > other ) {
1889+ public final <T > Flowable <T > startWith (Flowable <T > other ) {
18901890 Objects .requireNonNull (other , "other is null" );
18911891 return other .endWith (this .<T >toFlowable ());
18921892 }
@@ -1988,7 +1988,7 @@ public void onSubscribe(Disposable d) {
19881988 * @throws NullPointerException if s is null
19891989 */
19901990 @ SchedulerSupport (SchedulerKind .NONE )
1991- public final void subscribe (final NbpSubscriber <?> s ) {
1991+ public final void subscribe (final Observer <?> s ) {
19921992 Objects .requireNonNull (s , "s is null" );
19931993 try {
19941994 // TODO plugin wrapping the subscriber
@@ -2221,8 +2221,8 @@ public final <U> U to(Function<? super Completable, U> converter) {
22212221 * @return the new Observable created
22222222 */
22232223 @ SchedulerSupport (SchedulerKind .NONE )
2224- public final <T > Observable <T > toFlowable () {
2225- return Observable .create (new Publisher <T >() {
2224+ public final <T > Flowable <T > toFlowable () {
2225+ return Flowable .create (new Publisher <T >() {
22262226 @ Override
22272227 public void subscribe (Subscriber <? super T > s ) {
22282228 Completable .this .subscribe (s );
@@ -2237,10 +2237,10 @@ public void subscribe(Subscriber<? super T> s) {
22372237 * @return the new NbpObservable created
22382238 */
22392239 @ SchedulerSupport (SchedulerKind .NONE )
2240- public final <T > NbpObservable <T > toNbpObservable () {
2241- return NbpObservable .create (new NbpOnSubscribe <T >() {
2240+ public final <T > Observable <T > toNbpObservable () {
2241+ return Observable .create (new NbpOnSubscribe <T >() {
22422242 @ Override
2243- public void accept (NbpSubscriber <? super T > s ) {
2243+ public void accept (Observer <? super T > s ) {
22442244 subscribe (s );
22452245 }
22462246 });
0 commit comments