mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Improve some comments and add an extra template
This commit is contained in:
@@ -19,6 +19,8 @@ import reactor.core.publisher.Mono;
|
||||
final class RxJavaToReactorTemplates {
|
||||
private RxJavaToReactorTemplates() {}
|
||||
|
||||
// Flowable.concatWith.
|
||||
|
||||
// XXX: `function` type change; look into `Refaster.canBeCoercedTo(...)`.
|
||||
static final class FlowableFilter<S, T extends S> {
|
||||
@BeforeTemplate
|
||||
@@ -110,6 +112,11 @@ final class RxJavaToReactorTemplates {
|
||||
}
|
||||
|
||||
// XXX: Stephan, this is actually the static method, therefore I don't think it is correct.
|
||||
// I think we don't want this.
|
||||
// But what about all the other things; `{Maybe,Flowable,Single}.just()` and these kinds of
|
||||
// methods?
|
||||
// We will need to rewrite those.
|
||||
|
||||
// static final class MaybeDefer<S, T extends S> {
|
||||
// @BeforeTemplate
|
||||
// Maybe<S> before(Maybe<S> maybe, Callable<? extends Maybe<T>> source) {
|
||||
@@ -122,6 +129,22 @@ final class RxJavaToReactorTemplates {
|
||||
// }
|
||||
// }
|
||||
|
||||
// XXX: Check with Stephan.
|
||||
// static final class MaybeFlatMap<I, T extends I, R> {
|
||||
// @BeforeTemplate
|
||||
// Maybe<R> before(Maybe<T> maybe, Function<I, Maybe<R>> function) {
|
||||
// return maybe.flatMap(function);
|
||||
// }
|
||||
//
|
||||
// @AfterTemplate
|
||||
// Maybe<R> after(Maybe<T> maybe, java.util.function.Function<I, Maybe<R>> function) {
|
||||
// return maybe
|
||||
// .as(RxJava2Adapter::maybeToMono)
|
||||
// .flatMap(function)
|
||||
// .as(RxJava2Adapter::monoToMaybe);
|
||||
// }
|
||||
// }
|
||||
|
||||
// static final class MaybeFlatMapSingleElement<
|
||||
// I, T extends I, O, P extends SingleSource<? extends O>> { // <S, T extends S, O> {
|
||||
// @BeforeTemplate
|
||||
@@ -153,8 +176,6 @@ final class RxJavaToReactorTemplates {
|
||||
}
|
||||
}
|
||||
|
||||
// ignoreelement.
|
||||
|
||||
static final class MaybeSwitchIfEmpty<S, T extends S> {
|
||||
@BeforeTemplate
|
||||
Single<S> before(Maybe<S> maybe, Single<T> single) {
|
||||
|
||||
Reference in New Issue
Block a user