public final class Predicates
extends java.lang.Object
Predicate
instances.Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
allOf(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if each of its
components evaluates to true . |
static <T> Predicate<T> |
allOf(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if both arguments
evaluate to true . |
static <T> Predicate<T> |
any()
Returns a predicate that always evaluates to
true . |
static <T> Predicate<T> |
anyOf(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if any one of its
components evaluates to true . |
static Predicate<UiElement> |
attributeContains(Attribute attribute,
java.lang.String substring)
|
static Predicate<UiElement> |
attributeEquals(Attribute attribute,
java.lang.Object expected)
|
static Predicate<UiElement> |
attributeFalse(Attribute attribute)
|
static Predicate<UiElement> |
attributeMatches(Attribute attribute,
java.lang.String regex)
|
static Predicate<UiElement> |
attributeTrue(Attribute attribute)
|
static <T> Predicate<T> |
not(Predicate<T> predicate)
Returns a predicate that is the negation of the provided
predicate . |
static Predicate<UiElement> |
withAncestor(Predicate<? super UiElement> ancestorPredicate) |
static Predicate<UiElement> |
withChild(Predicate<? super UiElement> childPredicate) |
static Predicate<UiElement> |
withParent(Predicate<? super UiElement> parentPredicate) |
static Predicate<UiElement> |
withSibling(Predicate<? super UiElement> siblingPredicate) |
public static <T> Predicate<T> any()
true
.public static <T> Predicate<T> not(Predicate<T> predicate)
predicate
.public static <T> Predicate<T> allOf(Predicate<? super T> first, Predicate<? super T> second)
true
if both arguments
evaluate to true
. The arguments are evaluated in order, and
evaluation will be "short-circuited" as soon as a false predicate is found.public static <T> Predicate<T> allOf(Predicate<? super T>... components)
true
if each of its
components evaluates to true
. The components are evaluated in
order, and evaluation will be "short-circuited" as soon as a false
predicate is found.public static <T> Predicate<T> anyOf(Predicate<? super T>... components)
true
if any one of its
components evaluates to true
. The components are evaluated in
order, and evaluation will be "short-circuited" as soon as a true predicate
is found.public static Predicate<UiElement> attributeEquals(Attribute attribute, java.lang.Object expected)
public static Predicate<UiElement> attributeMatches(Attribute attribute, java.lang.String regex)
public static Predicate<UiElement> attributeContains(Attribute attribute, java.lang.String substring)
public static Predicate<UiElement> withParent(Predicate<? super UiElement> parentPredicate)
public static Predicate<UiElement> withAncestor(Predicate<? super UiElement> ancestorPredicate)
public static Predicate<UiElement> withSibling(Predicate<? super UiElement> siblingPredicate)