Why doesn't Java 8's Predicate<T> extend Function<T, Boolean>
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 this: @FunctionalInterface public interface Predicate<T> extends Function<T, Boolean> { boolean test(T t); @Override default Boolean apply(T t) { return Boolean.valueOf(test(t)); } } I was wondering, is there a compelling reason Java 8 API designers chose to keep the Predicate completely separate from Function ? Is there some evidence that they considered doing so and decided against it? I guess similar question goes for all the other 'special'