T
- the type of object this condition accepts.public class AnyOf<T> extends Join<T>
true
if any of the joined conditions is satisfied.conditions
Modifier | Constructor and Description |
---|---|
private |
AnyOf(Condition<? super T>... conditions) |
private |
AnyOf(java.lang.Iterable<? extends Condition<? super T>> conditions) |
Modifier and Type | Method and Description |
---|---|
static <T> Condition<T> |
anyOf(Condition<? super T>... conditions)
Creates a new
|
static <T> Condition<T> |
anyOf(java.lang.Iterable<? extends Condition<? super T>> conditions)
Creates a new
|
boolean |
matches(T value)
Verifies that the given value satisfies this condition.
|
java.lang.String |
toString() |
conditions
as, as, describedAs, describedAs, description
@SafeVarargs public static <T> Condition<T> anyOf(Condition<? super T>... conditions)
AnyOf
T
- the type of object the given condition accept.conditions
- the conditions to evaluate.AnyOf
.java.lang.NullPointerException
- if the given array is null
.java.lang.NullPointerException
- if any of the elements in the given array is null
.public static <T> Condition<T> anyOf(java.lang.Iterable<? extends Condition<? super T>> conditions)
AnyOf
T
- the type of object the given condition accept.conditions
- the conditions to evaluate.AnyOf
.java.lang.NullPointerException
- if the given iterable is null
.java.lang.NullPointerException
- if any of the elements in the given iterable is null
.public boolean matches(T value)