Class FlowableUtils

java.lang.Object
org.aksw.commons.rx.util.FlowableUtils

public class FlowableUtils extends Object
  • Constructor Details

    • FlowableUtils

      public FlowableUtils()
  • Method Details

    • createFlowableFromResource

      public static <R, I, T> io.reactivex.rxjava3.core.Flowable<T> createFlowableFromResource(Callable<R> resourceSupplier, Function<? super R,I> resourceToIterator, Predicate<? super I> hasNext, Function<? super I,T> next, Consumer<? super R> closeResource)
      Generic helper to create a Flowable by mapping some resource such as in InputStream or a QueryExecution to an iterable such as an ResultSet
      Type Parameters:
      R -
      I -
      T -
      Parameters:
      resourceSupplier -
      resourceToIterator -
      hasNext -
      next -
      closeResource -
      Returns: