Interface Multi<T>

    • Method Detail

      • map

        default <U> Multi<U> map​(Mapper<T,​U> mapper)
        Map this Multi instance to a new Multi of another type using the given Mapper.
        Type Parameters:
        U - mapped item type
        Parameters:
        mapper - mapper
        Returns:
        Multi
        Throws:
        NullPointerException - if mapper is null
      • collectList

        default Single<List<T>> collectList()
        Collect the items of this Multi instance into a Single of List.
        Returns:
        Single
      • collect

        default <U> Single<U> collect​(Collector<T,​U> collector)
        Collect the items of this Multi instance into a Single.
        Type Parameters:
        U - collector container type
        Parameters:
        collector - collector to use
        Returns:
        Single
        Throws:
        NullPointerException - if collector is null
      • first

        default Single<T> first()
        Get the first item of this Multi instance as a Single.
        Returns:
        Single
      • from

        static <T> Multi<T> from​(Flow.Publisher<T> source)
        Create a Multi instance wrapped around the given publisher.
        Type Parameters:
        T - item type
        Parameters:
        source - source publisher
        Returns:
        Multi
        Throws:
        NullPointerException - if source is null
      • just

        static <T> Multi<T> just​(Collection<T> items)
        Create a Multi instance that publishes the given items to a single subscriber.
        Type Parameters:
        T - item type
        Parameters:
        items - items to publish
        Returns:
        Multi
        Throws:
        NullPointerException - if items is null
      • just

        @SafeVarargs
        static <T> Multi<T> just​(T... items)
        Create a Multi instance that publishes the given items to a single subscriber.
        Type Parameters:
        T - item type
        Parameters:
        items - items to publish
        Returns:
        Multi
        Throws:
        NullPointerException - if items is null
      • empty

        static <T> Multi<T> empty()
        Get a Multi instance that completes immediately.
        Type Parameters:
        T - item type
        Returns:
        Multi
      • never

        static <T> Multi<T> never()
        Get a Multi instance that never completes.
        Type Parameters:
        T - item type
        Returns:
        Multi