Package: org.gradle.api.tasks.util

## [Java] Class PatternSet

- org.gradle.api.tasks.util.PatternSet

- All Implemented Interfaces and Traits:
    AntBuilderAware, PatternFilterable

      public class PatternSet
      extends Object

  Standalone implementation of PatternFilterable.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `PatternSet ()`
    `protected PatternSet (PatternSet patternSet)`
    `protected PatternSet (org.gradle.api.tasks.util.internal.PatternSpecFactory patternSpecFactory)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `Object` | `addToAntBuilder(Object node, String childNodeName)`
    `PatternSet` | `copyFrom(PatternFilterable sourcePattern)`
    `protected PatternSet` | `doCopyFrom(PatternSet from)`
    `boolean` | `equals(Object o)`
    `PatternSet` | `exclude(String... excludes)`
    `PatternSet` | `exclude(Iterable excludes)`
    `PatternSet` | `exclude(Spec<FileTreeElement> spec)`
    `PatternSet` | `exclude(groovy.lang.Closure closure)`
    `PatternSet` | `excludeSpecs(Iterable<Spec<FileTreeElement>> excludes)`
    `Spec<FileTreeElement>` | `getAsExcludeSpec()`
    `Spec<FileTreeElement>` | `getAsIncludeSpec()`
    `Spec<FileTreeElement>` | `getAsSpec()`
    `Set<Spec<FileTreeElement>>` | `getExcludeSpecs()`
    `Set<String>` | `getExcludes()`
    `Set<Spec<FileTreeElement>>` | `getIncludeSpecs()`
    `Set<String>` | `getIncludes()`
    `int` | `hashCode()`
    `PatternSet` | `include(String... includes)`
    `PatternSet` | `include(Iterable includes)`
    `PatternSet` | `include(Spec<FileTreeElement> spec)`
    `PatternSet` | `include(groovy.lang.Closure closure)`
    `PatternSet` | `includeSpecs(Iterable<Spec<FileTreeElement>> includeSpecs)`
    `PatternSet` | `intersect()`
    `boolean` | `isCaseSensitive()`
    `boolean` | `isEmpty()` The PatternSet is considered empty when no includes or excludes have been added.
    `void` | `setCaseSensitive(boolean caseSensitive)`
    `PatternSet` | `setExcludes(Iterable<String> excludes)`
    `PatternSet` | `setIncludes(Iterable<String> includes)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public PatternSet()

    - #### @Incubating protected PatternSet(PatternSet patternSet)

    - #### @Incubating protected PatternSet(org.gradle.api.tasks.util.internal.PatternSpecFactory patternSpecFactory)

  - ### Method Detail

    - #### public Object addToAntBuilder(Object node, String childNodeName)

    - #### public PatternSet copyFrom(PatternFilterable sourcePattern)

    - #### protected PatternSet doCopyFrom(PatternSet from)

    - #### @Override public boolean equals(Object o)

    - #### public PatternSet exclude(String... excludes)

    - #### public PatternSet exclude(Iterable excludes)

    - #### public PatternSet exclude(Spec<FileTreeElement> spec)

    - #### public PatternSet exclude(groovy.lang.Closure closure)

    - #### public PatternSet excludeSpecs(Iterable<Spec<FileTreeElement>> excludes)

    - #### public Spec<FileTreeElement> getAsExcludeSpec()

    - #### public Spec<FileTreeElement> getAsIncludeSpec()

    - #### public Spec<FileTreeElement> getAsSpec()

    - #### public Set<Spec<FileTreeElement>> getExcludeSpecs()

    - #### public Set<String> getExcludes()

    - #### public Set<Spec<FileTreeElement>> getIncludeSpecs()

    - #### public Set<String> getIncludes()

    - #### @Override public int hashCode()

    - #### public PatternSet include(String... includes)

    - #### public PatternSet include(Iterable includes)

    - #### public PatternSet include(Spec<FileTreeElement> spec)

    - #### public PatternSet include(groovy.lang.Closure closure)

    - #### public PatternSet includeSpecs(Iterable<Spec<FileTreeElement>> includeSpecs)

    - #### public PatternSet intersect()

    - #### public boolean isCaseSensitive()

    - #### public boolean isEmpty()

      The PatternSet is considered empty when no includes or excludes have been added. The Spec returned by getAsSpec method only contains the default excludes patterns in this case.

      Returns:
        true when no includes or excludes have been added to this instance

    - #### public void setCaseSensitive(boolean caseSensitive)

    - #### public PatternSet setExcludes(Iterable<String> excludes)

    - #### public PatternSet setIncludes(Iterable<String> includes)