AndSpec (Gradle API 8.11)

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>

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

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static AndSpec<?>` | `EMPTY` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AndSpec()` |
    `AndSpec​(java.lang.Iterable<? extends Spec<? super T>> specs)` |
    `AndSpec​(Spec<? super T>... specs)` |

  - ### 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 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)` |

    - ### Methods inherited from class org.gradle.api.specs.CompositeSpec

      `equals, getSpecs, hashCode, isEmpty`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY

          public static final AndSpec<?> EMPTY

  - ### Constructor Detail

    - #### AndSpec

          public AndSpec()

    - #### AndSpec

          @SafeVarargs
          public AndSpec​(Spec<? super T>... specs)

    - #### AndSpec

          public AndSpec​(java.lang.Iterable<? extends Spec<? super T>> specs)

  - ### Method Detail

    - #### isSatisfiedBy

          public boolean isSatisfiedBy​(T object)

    - #### findUnsatisfiedSpec

          @Nullable
          @Incubating
          public Spec<? super T> findUnsatisfiedSpec​(T object)

      Finds the first `Spec` that is not satisfied by the object.
      Parameters:
        `object` - to check specs against
      Returns:
        an unsatisfied spec or null
      Since:
        7.6

    - #### and

          public AndSpec<T> and​(Spec<? super T>... specs)

    - #### and

          public AndSpec<T> and​(Spec<? super T> spec)

      Typed and() method for a single `Spec`.
      Since:
        4.3

    - #### and

          public AndSpec<T> and​(Closure spec)

    - #### empty

          public static <T> AndSpec<T> empty()