本文整理汇总了Java中java.util.function.Predicate.negate方法的典型用法代码示例。如果您正苦于以下问题:Java Predicate.negate方法的具体用法?Java Predicate.negate怎么用?Java Predicate.negate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.function.Predicate
的用法示例。
在下文中一共展示了Predicate.negate方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: not
import java.util.function.Predicate; //导入方法依赖的package包/类
public static <T> Predicate<T> not(Predicate<T> t) {
return t.negate();
}
示例2: not
import java.util.function.Predicate; //导入方法依赖的package包/类
static <T> Predicate<T> not(Predicate<T> predicate) {
return predicate.negate();
}
示例3: forFilterDirective
import java.util.function.Predicate; //导入方法依赖的package包/类
public static <T> Predicate<T> forFilterDirective(RestFilterDirective filterDirective, Class<T> rootBeanType) {
Predicate<T> predicate = new XmlElementPathBeanPredicate<>(filterDirective.getProperty(), filterDirective.getOperator(), filterDirective.getValue(), rootBeanType);
return (filterDirective.isNegative() ? predicate.negate() : predicate);
}
示例4: not
import java.util.function.Predicate; //导入方法依赖的package包/类
public static <R> Predicate<R> not(Predicate<R> predicate) {
return predicate.negate();
}
示例5: not
import java.util.function.Predicate; //导入方法依赖的package包/类
public static <T> Predicate<T> not(Predicate<T> t) {
return t.negate();
}
示例6: not
import java.util.function.Predicate; //导入方法依赖的package包/类
/**
* Negates a predicate: mostly useful when our predicate is a method reference or lambda where we can't
* call negate() on it directly, or where the code reads better by having the negation at the beginning
* rather than the end.
*/
static <T> Predicate<T> not(Predicate<T> test) {
return test.negate();
}
示例7: not
import java.util.function.Predicate; //导入方法依赖的package包/类
/**
* Returns a predicate that represents the logical negation of specified
* predicate.
*
* @param <T> The type of arguments to the predicate
* @param predicate The predicate to negate
* @return A predicate that represents the logical negation of specified
* predicate
*/
public static <T> Predicate<T> not(Predicate<T> predicate) {
Objects.requireNonNull(predicate);
return predicate.negate();
}
示例8: not
import java.util.function.Predicate; //导入方法依赖的package包/类
/**
* Returns a {@link Predicate} that represents the logical negation of this
* predicate.
*
* @param predicate {@link Predicate} to negate
* @param <T> the type of the input to the predicate
* @return a predicate that represents the logical negation of this
* predicate
*/
public static <T> Predicate<T> not(Predicate<T> predicate) {
return predicate.negate();
}
示例9: not
import java.util.function.Predicate; //导入方法依赖的package包/类
public static <T> Predicate<T> not(Predicate<T> predicate) { return predicate.negate(); }
示例10: not
import java.util.function.Predicate; //导入方法依赖的package包/类
public static final <T> Predicate<T> not(Predicate<T> predicate) { return predicate.negate(); }