com.google.gwt.emul.java.util.function.Predicate Maven / Gradle / Ivy
The newest version!
package java.util.function;
import java.util.Objects;
@FunctionalInterface
public interface Predicate {
default Predicate and(Predicate other) {
return (t) -> Predicate.this.test(t) && other.test(t);
}
static Predicate isEqual(Object targetRef) {
return (null == targetRef) ? Objects::isNull : object -> targetRef.equals(object);
}
default Predicate negate() {
return (t) -> !Predicate.this.test(t);
}
default Predicate or(Predicate other) {
assert other != null;
return (t) -> Predicate.this.test(t) || other.test(t);
}
boolean test(T t);
}