Closed GoogleCodeExporter closed 9 years ago
The Predicate Javadoc has the answer:
NOTE: This interface could technically extend Function, since a predicate is
just a
special case of a function (one that returns a boolean). However, since
implementing
this would entail changing the signature of the apply method to return a Boolean
instead of a boolean, which would in turn allow people to return null from their
predicate, which would in turn enable code that looks like if
(myPredicate.apply(myObject)) ... to throw a NullPointerException, it was
decided
not to make this change.
Original comment by cpov...@google.com
on 10 Apr 2008 at 5:31
Original comment by kevin...@gmail.com
on 10 Apr 2008 at 5:58
Original issue reported on code.google.com by
estebis...@gmail.com
on 10 Apr 2008 at 5:03