T
-谓词函数的第一个参数的类型
U
-第二个参数的谓词的类型
@FunctionalInterface public interface BiPredicate<T,U>
Predicate
两性专业化。
这是一个functional interface其功能的方法是test(Object, Object)
。
Predicate
Modifier and Type | Method and Description |
---|---|
default BiPredicate<T,U> |
and(BiPredicate<? super T,? super U> other)
返回一个由谓词表示短路逻辑和谓词和另一个。
|
default BiPredicate<T,U> |
negate()
返回一个表示该谓词的逻辑否定的谓词。
|
default BiPredicate<T,U> |
or(BiPredicate<? super T,? super U> other)
返回一个由谓词表示短路逻辑或该谓词和另一个。
|
boolean |
test(T t, U u)
在给定的参数上计算这个谓词。
|
default BiPredicate<T,U> and(BiPredicate<? super T,? super U> other)
false
,然后
other
谓词不评价。
抛出的任何异常或谓词评估过程中传递给调用者;如果该谓词评价抛出一个异常,这other
谓词将不进行评估。
other
-谓语,将逻辑AND这个谓词
other
NullPointerException
-如果其他是空的
default BiPredicate<T,U> negate()
default BiPredicate<T,U> or(BiPredicate<? super T,? super U> other)
true
,然后
other
谓词不评价。
抛出的任何异常或谓词评估过程中传递给调用者;如果该谓词评价抛出一个异常,这other
谓词将不进行评估。
other
-谓语,将逻辑或与该谓词
other
NullPointerException
-如果其他是空的
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.