Package org.gradle.api.specs
Class AndSpec<T>
- java.lang.Object
-
- org.gradle.api.specs.CompositeSpec<T>
-
- org.gradle.api.specs.AndSpec<T>
-
- Type Parameters:
T
- The target type for this Spec
- All Implemented Interfaces:
Spec<T>
public class AndSpec<T> extends CompositeSpec<T>
ACompositeSpec
which requires all its specs to be true in order to evaluate to true. Uses lazy evaluation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AndSpec<T>
and(Closure spec)
AndSpec<T>
and(Spec<? super T> spec)
Typed and() method for a singleSpec
.AndSpec<T>
and(Spec<? super T>... specs)
static <T> AndSpec<T>
empty()
Spec<? super T>
findUnsatisfiedSpec(T object)
Finds the firstSpec
that is not satisfied by the object.boolean
isSatisfiedBy(T object)
-
Methods inherited from class org.gradle.api.specs.CompositeSpec
equals, getSpecs, hashCode, isEmpty
-
-
-
-
Field Detail
-
EMPTY
public static final AndSpec<?> EMPTY
-
-
Method Detail
-
isSatisfiedBy
public boolean isSatisfiedBy(T object)
-
findUnsatisfiedSpec
@Nullable @Incubating public Spec<? super T> findUnsatisfiedSpec(T object)
Finds the firstSpec
that is not satisfied by the object.- Parameters:
object
- to check specs against- Returns:
- an unsatisfied spec or null
- Since:
- 7.6
-
empty
public static <T> AndSpec<T> empty()
-
-