Package org.pipecraft.pipes.sync.inter
Class FilterPipe<T>
- java.lang.Object
-
- org.pipecraft.pipes.sync.inter.FilterBasePipe<T>
-
- org.pipecraft.pipes.sync.inter.FilterPipe<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BasePipe,Pipe<T>
public class FilterPipe<T> extends FilterBasePipe<T>
A pipe filtering an input pipe by some predicate on the pipe items.- Author:
- Eyal Schneider
-
-
Constructor Summary
Constructors Constructor Description FilterPipe(Pipe<T> input, Predicate<? super T> predicate)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanshouldSelect(T item)-
Methods inherited from class org.pipecraft.pipes.sync.inter.FilterBasePipe
close, getProgress, next, peek, start
-
-
-
-
Method Detail
-
shouldSelect
protected boolean shouldSelect(T item)
- Specified by:
shouldSelectin classFilterBasePipe<T>- Parameters:
item- The next item from the input stream- Returns:
- true if and only if the item should be selected
-
-