![]() |
VOOZH | about |
The BiPredicate<T, V> interface was introduced in JDK 8. This interface is packaged in java.util.function package. It operates on two objects and returns a predicate value based on that condition. It is a functional interface and thus can be used in lambda expression also.
public interface BiPredicate<T, V>
Methods:
boolean test(T obj, V obj1)
default BiPredicate<T, V> and(BiPredicate<? super T, ? super V> other)
default BiPredicate<T, V> negate()
default BiPredicate<T, V> or(BiPredicate<? super T, ? super V> other)
Example:
true false true true
Reference: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiPredicate.html