You would have to do .filter(((Predicate<String>) String::isEmpty).negate())
If you want, you can define
static<T> Predicate<T> not(Predicate<T> p) {
return t -> !p.test(t);
}
and then
.filter(not(String::isEmpty))
but I would just stick with v -> !v.isEmpty()