gradle
8.3

# AndSpec

open class AndSpec<T> : CompositeSpec<T>

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

#### Parameters

<T>

The target type for this Spec

## Constructors

AndSpec
Link copied to clipboard
constructor()
@SafeVarargs
constructor(specs: Array<Spec<out Any>>)
constructor(specs: Iterable<out Spec<out Any>>)

## Functions

and
Link copied to clipboard
open fun and(spec: Closure): AndSpec<T>
open fun and(specs: Array<Spec<out Any>>): AndSpec<T>
open fun and(spec: Spec<out Any>): AndSpec<T>
Typed and() method for a single Spec.
empty
Link copied to clipboard
open fun <T> empty(): AndSpec<T>
equals
Link copied to clipboard
fun equals(o: Any): Boolean
findUnsatisfiedSpec
Link copied to clipboard
@Nullable
@Incubating
open fun findUnsatisfiedSpec(object: T): Spec<out Any>
Finds the first Spec that is not satisfied by the object.
getSpecs
Link copied to clipboard
open fun getSpecs(): List<Spec<out Any>>
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
isSatisfiedBy
Link copied to clipboard
open fun isSatisfiedBy(object: T): Boolean

## Properties

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