T - The target type for this SpecSpec<T>public class AndSpec<T> extends CompositeSpec<T>
CompositeSpec which requires all its specs to be true in order to evaluate to true.
Uses lazy evaluation.| Constructor | Description |
|---|---|
AndSpec() |
|
AndSpec(java.lang.Iterable<? extends Spec<? super T>> specs) |
|
AndSpec(Spec<? super T>... specs) |
| Modifier and Type | Method | Description |
|---|---|---|
AndSpec<T> |
and(Closure spec) |
|
AndSpec<T> |
and(Spec<? super T> spec) |
Typed and() method for a single
Spec. |
AndSpec<T> |
and(Spec<? super T>... specs) |
|
static <T> AndSpec<T> |
empty() |
|
Spec<? super T> |
findUnsatisfiedSpec(T object) |
Finds the first
Spec that is not satisfied by the object. |
boolean |
isSatisfiedBy(T object) |
equals, getSpecs, hashCode, isEmptypublic static final AndSpec<?> EMPTY
public boolean isSatisfiedBy(T object)
@Nullable @Incubating public Spec<? super T> findUnsatisfiedSpec(T object)
Spec that is not satisfied by the object.object - to check specs againstpublic static <T> AndSpec<T> empty()