Interface VirtualTransformer<T,R>

Type Parameters:
T - the source value type
R - the result value type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface VirtualTransformer<T,R>
Interface called by the Flowable.virtualTransform(VirtualTransformer, java.util.concurrent.ExecutorService) operator to generate any number of output values based of the current input of the upstream.
Since:
4.0.0
  • Method Details

    • transform

      void transform(T value, VirtualEmitter<R> emitter) throws Throwable
      Implement this method to generate any number of items via VirtualEmitter.emit(Object).
      Parameters:
      value - the upstream value
      emitter - the emitter to use to generate result value(s)
      Throws:
      Throwable - signaled as onError for the downstream.