# AndSpec

open class AndSpec<T> : CompositeSpec<T> (source)

A org.gradle.api.specs.CompositeSpec which requires all its specs to be true in order to evaluate to true. Uses lazy evaluation.

#### Since

0.7

#### Parameters

<T>

The target type for this Spec

## Constructors

AndSpec
Link copied to clipboard
constructor()
Creates a new `AndSpec`.
@SafeVarargs
constructor(specs: Array<Spec<in T>>)
Creates a new `AndSpec`.
constructor(specs: Iterable<out Spec<in T>>)
Creates a new `AndSpec`.

## Properties

EMPTY
Link copied to clipboard
val EMPTY: AndSpec<out Any>
The empty.

## Functions

and
Link copied to clipboard
open fun and(spec: Closure): AndSpec<T>
@SafeVarargs
fun and(specs: Array<Spec<in T>>): AndSpec<T>
And.
open fun and(spec: Spec<in T>): AndSpec<T>
Typed and() method for a single Spec.
empty
Link copied to clipboard
open fun <T> empty(): AndSpec<T>
Empty.
equals
Link copied to clipboard
fun equals(o: Any): Boolean
findUnsatisfiedSpec
Link copied to clipboard
@Nullable
@Incubating
open fun findUnsatisfiedSpec(object: T): @Nullable Spec<in T>
Finds the first Spec that is not satisfied by the object.
getSpecs
Link copied to clipboard
open fun getSpecs(): List<Spec<in T>>
Returns the specs.
hashCode
Link copied to clipboard
fun hashCode(): Int
invoke
Link copied to clipboard
operator fun <T> Spec<T>.invoke(arg: T): Boolean

Enables function invocation syntax on Spec instances.

isEmpty
Link copied to clipboard
open fun isEmpty(): Boolean
Returns whether empty is set.
isSatisfiedBy
Link copied to clipboard
open fun isSatisfiedBy(object: T): Boolean
Returns whether satisfied by is set.