I wrote this generic predicate:
private static <T> Predicate<T> isNull(){
return Objects::isNull;
}
But I can't use it in combination with other predicates like this:
private static Predicate<String> isEmpty(){
return string -> string.isEmpty();
}
Because this snippet will not compile (expects Predicate< String> in or operation):
isNull().or(isEmpty())
Any idea to solve it? Thanks!