All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.pincette.rs.Pipe Maven / Gradle / Ivy

package net.pincette.rs;

import static net.pincette.rs.Box.box;

import java.util.concurrent.Flow.Processor;

/**
 * Creates a pipeline of multiple processors.
 *
 * @param  the incoming value type of the first processor.
 * @param  the outgoing value type of the last processor.
 * @author Werner Donn\u00e9
 * @since 3.0
 */
public class Pipe extends Delegate {
  public Pipe(final Processor processor) {
    super(processor);
  }

  public static  Pipe pipe(final Processor processor) {
    return new Pipe<>(processor);
  }

  public  Pipe then(final Processor processor) {
    return pipe(box(this, processor));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy