Class Separator<T>

Type Parameters:
T - the value type.
All Implemented Interfaces:
Flow.Processor<T,T>, Flow.Publisher<T>, Flow.Subscriber<T>

public class Separator<T> extends Buffered<T,T>
A processor which emits a given value between the incoming value stream.
Since:
1.0
Author:
Werner Donné
  • Constructor Details

    • Separator

      public Separator(T value)
    • Separator

      public Separator(Supplier<T> value)
  • Method Details

    • separator

      public static <T> Flow.Processor<T,T> separator(T value)
    • separator

      public static <T> Flow.Processor<T,T> separator(Supplier<T> value)
    • onNextAction

      protected boolean onNextAction(T value)
      Description copied from class: Buffered
      The onNext method uses this method.
      Specified by:
      onNextAction in class Buffered<T,T>
      Parameters:
      value - the received value.
      Returns:
      Indicated if values have been added or not.