Predicate-谓语

Predicate 对给定的输入参数执行操作,返回一个boolean类型的结果(布尔值函数)
BiPredicate<T,U> 对给定的两个输入参数执行操作,返回一个boolean类型的结果(布尔值函数)
DoublePredicate 对给定的double参数执行操作,返回一个boolean类型的结果(布尔值函数)
IntPredicate 对给定的int输入参数执行操作,返回一个boolean类型的结果(布尔值函数)
LongPredicate 对给定的long参数执行操作,返回一个boolean类型的结果(布尔值函数)
1.Predicate
对给定的输入参数执行操作,返回一个boolean类型的结果(布尔值函数)

boolean test(T t) 根据给定的参数进行判断
Predicate and(Predicate<? super T> other) 返回一个组合判断,将other以短路并且的方式加入到函数的判断中
Predicate or(Predicate<? super T> other) 返回一个组合判断,将other以短路或的方式加入到函数的判断中
Predicate negate() 将函数的判断取反

原文地址:https://www.cnblogs.com/w2758472746/p/14057159.html