Class MultiConvert<T>

  • Type Parameters:
    T - the type of item emitted by the upstream.

    public class MultiConvert<T>
    extends java.lang.Object
    Converts the upstream into another reactive type.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiConvert​(Multi<T> upstream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<T> toPublisher()
      Converts the Multi into a Publisher.
      <R> R with​(java.util.function.Function<Multi<T>,​R> converter)
      Transforms this Multi into a type using the provided converter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiConvert

        public MultiConvert​(Multi<T> upstream)
    • Method Detail

      • with

        public <R> R with​(java.util.function.Function<Multi<T>,​R> converter)
        Transforms this Multi into a type using the provided converter.
        Type Parameters:
        R - the type produced by the converter
        Parameters:
        converter - the converter function
        Returns:
        an instance of R
        Throws:
        java.lang.RuntimeException - if the conversion fails.
      • toPublisher

        @CheckReturnValue
        public org.reactivestreams.Publisher<T> toPublisher()
        Converts the Multi into a Publisher.

        Basically, this method returns the Multi as it is, as Multi implements Publisher.

        Returns:
        the publisher