Class MaybeMap<T,R>

Type Parameters:
T - the upstream value type
R - the downstream value type
All Implemented Interfaces:
MaybeSource<R>, HasUpstreamMaybeSource<T>

public final class MaybeMap<T,R> extends AbstractMaybeWithUpstream<T,R>
Maps the upstream success value into some other value.
  • Field Details

    • mapper

      final Function<? super T,? extends R> mapper
  • Constructor Details

  • Method Details

    • subscribeActual

      protected void subscribeActual(MaybeObserver<? super R> observer)
      Description copied from class: Maybe
      Implement this method in subclasses to handle the incoming MaybeObservers.

      There is no need to call any of the plugin hooks on the current Maybe instance or the MaybeObserver; all hooks and basic safeguards have been applied by Maybe.subscribe(MaybeObserver) before this method gets called.

      Specified by:
      subscribeActual in class Maybe<R>
      Parameters:
      observer - the MaybeObserver to handle, not null