└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Copy paste guide for RxJava1-to-RxJava2 2 | 3 | Feel free to add more copy-paste guides 4 | 5 | | Copy (RxJava1) | Paste (RxJava2) |Remarks| 6 | | ------------- | ------------- | ------------| 7 | |```Observable``` |```Flowable```| 8 | |```CompositeSubscription```|```CompositeDisposable```| 9 | |```Subscription```|```Disposable```| 10 | |```Observable.subscribe(Observer)```|```Observable.subscribeWith(DisposableSubscriber)```|Only if you want it to return a disposable| 11 | |```Observable.Transformer```|```FlowableTransformer```| 12 | |```Action1```|```Consumer```| 13 | |```Action2```|```BiConsumer```| 14 | |```Action0```|```Action```| 15 | |```Func1```|```Function```| 16 | |```Func2```|```BiFunction```| 17 | |```Func1.call(T)```|```Function.apply(T)```| 18 | |```Actions.empty()```|```Functions.EMPTY_ACTION```|Similarly there are ```Functions.emptyConsumer``` and ```Functions.emptyBiconsumer```| 19 | |```TestSubscription.getNextEvents()```|```TestSubscription.values```| 20 | |```RxJavaCallAdapterFactory```|```RxJava2CallAdapterFactory```| 21 | |```PublishSubject.asObservable()```|```PublishSubject.hide()```| 22 | --------------------------------------------------------------------------------