api / org.gradle.api.specs / Spec

Spec

interface Spec<T : Any>

Represents some predicate against objects of type T.

Parameters

- The target type for this Spec

Functions

isSatisfiedBy

abstract fun isSatisfiedBy(element: T): Boolean

Extension Functions

invoke

operator fun <T> Spec<T>.invoke(arg: T): Boolean

Enables function invocation syntax on Spec instances.

Inheritors

CompositeSpec

abstract class CompositeSpec<T : Any> : Spec<T>

A org.gradle.api.specs.Spec which aggregates a sequence of other Spec instances.

NotSpec

open class NotSpec<T : Any> : Spec<T>

A org.gradle.api.specs.Spec implementation which negates another Spec.