public class Predicates extends Object
Predicate implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
Predicates.Matcher |
static class |
Predicates.Node |
static class |
Predicates.Reference |
| Constructor and Description |
|---|
Predicates() |
| Modifier and Type | Method and Description |
|---|---|
static Predicate |
alwaysTrue()
Always return true.
|
static Predicate |
and(Predicate... predicates)
Successful if all given predicates are satisfied.
|
static Predicates.Node |
node() |
static Predicate |
on(ElementType type)
Restrict to the given
ElementType. |
static Predicate |
onlySupportedElements(Class<? extends Annotation> annotationType)
Restrict to the supported
ElementType(s) of the annotation (use the @Target, if provided). |
static Predicate |
or(Collection<Predicate> predicates)
Successful if at least one of the given predicates is satisfied.
|
static Predicate |
or(Predicate... predicates)
Successful if at least one of the given predicates is satisfied.
|
static Predicates.Matcher |
pattern(String regex) |
static Predicates.Reference |
reference(String refId) |
public static Predicates.Node node()
public static Predicates.Reference reference(String refId)
public static Predicates.Matcher pattern(String regex)
public static Predicate on(ElementType type)
ElementType.type - expected ElementTypepublic static Predicate alwaysTrue()
public static Predicate and(Predicate... predicates)
predicates - predicates to be satisfiedpublic static Predicate or(Collection<Predicate> predicates)
predicates - predicates to be satisfied (at least one)public static Predicate or(Predicate... predicates)
predicates - predicates to be satisfied (at least one)public static Predicate onlySupportedElements(Class<? extends Annotation> annotationType)
ElementType(s) of the annotation (use the @Target, if provided).annotationType - annotation to exploreCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.