The intent of this design pattern is to to introduce a functional interface that will add a functionality for container-like objects to easily return filtered versions of themselves.
The intent of this design pattern is to introduce a functional interface that will add a functionality for container-like objects to easily return filtered versions of themselves.
## Explanation
Real world example
...
...
@@ -59,7 +59,7 @@ The container-like object (`ThreatAwareSystem` in our case) needs to have a meth
ability to covariantly specify a lower bound of contravariant `Predicate` in the subinterfaces of interfaces representing the container-like objects.
In our example we will be able to pass a predicate that takes `? extends Threat` object and return `? extends ThreatAwareSystem`
from `Filtered::by` method. A simple implementation of `ThreadAwareSystem` :
from `Filtered::by` method. A simple implementation of `ThreatAwareSystem` :