+str #17967 add filterNot combinator

This commit is contained in:
Alexander Golubev 2015-10-25 15:38:47 -04:00
parent 630bd948d5
commit 15cabbfed7
4 changed files with 45 additions and 1 deletions

View file

@ -506,6 +506,12 @@ class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[Sour
def filter(p: function.Predicate[Out]): javadsl.Source[Out, Mat] =
new Source(delegate.filter(p.test))
/**
* Only pass on those elements that NOT satisfy the given predicate.
*/
def filterNot(p: function.Predicate[Out]): javadsl.Source[Out, Mat] =
new Source(delegate.filterNot(p.test))
/**
* Transform this stream by applying the given partial function to each of the elements
* on which the function is defined as they pass through this processing step.