Module mutiny.zero

Class Transform<I,O>

java.lang.Object
mutiny.zero.operators.Transform<I,O>
Type Parameters:
I - the input elements type
O - the output elements type
All Implemented Interfaces:
Flow.Publisher<O>

public class Transform<I,O> extends Object implements Flow.Publisher<O>
A Flow.Publisher that transforms elements using a Function.
  • Constructor Details

    • Transform

      public Transform(Flow.Publisher<I> upstream, Function<I,O> function)
      Build a new transformation publisher.
      Parameters:
      upstream - the upstream publisher
      function - the transformation function, must not throw exceptions, must not return null values
  • Method Details