本文整理匯總了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(); }