Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@FunctionalInterface
public Predicate<T> {
void test(T t);
// default method
default Predicate<T> and(Predicate<? super T> other) {
// more code here
}
default Predicate<T> or(Predicate<? super T> other) {
// more code here
}
default Predicate<T> negate() {
// more code here
}
// static
static <T> Predicate<T> isEqual(Object o) {
// more code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment