It the following implementation better?
```java
    public <R> Observable<R> mergeMap(
            final Func1<? super T, ? extends Observable<? extends R>> onNext,
            final Func1<? super Throwable, ? extends Observable<? extends R>> onError,
            final Func0<? extends Observable<? extends R>> onCompleted) {
        return materialize().flatMap(
                new Func1<Notification<T>, Observable<? extends R>>() {
                    @Override
                    public Observable<? extends R> call(Notification<T> t1) {
                        if (t1.isOnNext()) {
                            return onNext.call(t1.getValue());
                        }
                        if (t1.isOnError()) {
                            return onError.call(t1.getThrowable());
                        }
                        return onCompleted.call();
                    }
                });
    }
```