If I wrote the Predicate
interface, I\'d want to encode in the interface the fact that it\'s just a function that returns a primitive boolean
, like thi
There is no need for such a suspicious inheritance hierarchy. These functional interfaces are inter-changable.
Function f1=…;
Predicate p1=…;
Predicate p2=f1::apply;
Function f2=p1::test;
This works in both directions. So why should there be an inheritance relationship advertising one specific direction?