Class MapOperation<I,O>

java.lang.Object
org.infinispan.stream.impl.intops.object.MapOperation<I,O>
Type Parameters:
I - the type of the input stream
O - the type of the output stream
All Implemented Interfaces:
IntermediateOperation<I,Stream<I>,O,Stream<O>>, MappingOperation<I,Stream<I>,O,Stream<O>>

public class MapOperation<I,O> extends Object implements MappingOperation<I,Stream<I>,O,Stream<O>>
Performs map to operation on a regular Stream
  • Constructor Details

    • MapOperation

      public MapOperation(Function<? super I,? extends O> function)
    • MapOperation

      public MapOperation(SerializableFunction<? super I,? extends O> function)
  • Method Details

    • perform

      public Stream<O> perform(Stream<I> stream)
      Description copied from interface: IntermediateOperation
      Performs the actualy intermediate operation returning the resulting stream
      Specified by:
      perform in interface IntermediateOperation<I,Stream<I>,O,Stream<O>>
      Parameters:
      stream - the stream to have the operation performed on
      Returns:
      the resulting stream after the operation was applied
    • handleInjection

      public void handleInjection(ComponentRegistry registry)
      Description copied from interface: IntermediateOperation
      Handles injection of components for various dependencies that the intermediate operation has
      Specified by:
      handleInjection in interface IntermediateOperation<I,Stream<I>,O,Stream<O>>
      Parameters:
      registry - the registry to use
    • getFunction

      public Function<? super I,? extends O> getFunction()
    • mapFlowable

      public io.reactivex.rxjava3.core.Flowable<O> mapFlowable(io.reactivex.rxjava3.core.Flowable<I> input)
      Description copied from interface: IntermediateOperation
      Performs the intermediate operation on a Flowable. This is an interop method to allow Distributed Streams to actually use Distributed Publisher
      Specified by:
      mapFlowable in interface IntermediateOperation<I,Stream<I>,O,Stream<O>>
      Parameters:
      input - the input flowable
      Returns: