Categories.CategoryFilter (JUnit API)
Date: 2018-08-04

org.junit.experimental.categories

## Class Categories.CategoryFilter

- java.lang.Object
- - org.junit.runner.manipulation.Filter
  - - org.junit.experimental.categories.Categories.CategoryFilter

- Enclosing class:
    Categories

      public static class Categories.CategoryFilter
      extends Filter

- - ### Field Summary

    - ### Fields inherited from class org.junit.runner.manipulation.Filter

      `ALL`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Categories.CategoryFilter(boolean matchAnyIncludes, java.util.Set<java.lang.Class<?>> includes, boolean matchAnyExcludes, java.util.Set<java.lang.Class<?>> excludes)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Categories.CategoryFilter` | `categoryFilter(boolean matchAnyInclusions, java.util.Set<java.lang.Class<?>> inclusions, boolean matchAnyExclusions, java.util.Set<java.lang.Class<?>> exclusions)`
    `java.lang.String` | `describe()` Returns a textual description of this Filter
    `static Categories.CategoryFilter` | `exclude(boolean matchAny, java.lang.Class<?>... categories)`
    `static Categories.CategoryFilter` | `exclude(java.lang.Class<?>... categories)`
    `static Categories.CategoryFilter` | `exclude(java.lang.Class<?> category)`
    `static Categories.CategoryFilter` | `include(boolean matchAny, java.lang.Class<?>... categories)`
    `static Categories.CategoryFilter` | `include(java.lang.Class<?>... categories)`
    `static Categories.CategoryFilter` | `include(java.lang.Class<?> category)`
    `boolean` | `shouldRun(Description description)`
    `java.lang.String` | `toString()` Returns string in the form `"[included categories] - [excluded categories]"`, where both sets have comma separated names of categories.

    - ### Methods inherited from class org.junit.runner.manipulation.Filter

      `apply, intersect, matchMethodDescription`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Categories.CategoryFilter

          protected Categories.CategoryFilter(boolean matchAnyIncludes,
                                   java.util.Set<java.lang.Class<?>> includes,
                                   boolean matchAnyExcludes,
                                   java.util.Set<java.lang.Class<?>> excludes)

  - ### Method Detail

    - #### include

          public static Categories.CategoryFilter include(boolean matchAny,
                                          java.lang.Class<?>... categories)

    - #### include

          public static Categories.CategoryFilter include(java.lang.Class<?> category)

    - #### include

          public static Categories.CategoryFilter include(java.lang.Class<?>... categories)

    - #### exclude

          public static Categories.CategoryFilter exclude(boolean matchAny,
                                          java.lang.Class<?>... categories)

    - #### exclude

          public static Categories.CategoryFilter exclude(java.lang.Class<?> category)

    - #### exclude

          public static Categories.CategoryFilter exclude(java.lang.Class<?>... categories)

    - #### categoryFilter

          public static Categories.CategoryFilter categoryFilter(boolean matchAnyInclusions,
                                                 java.util.Set<java.lang.Class<?>> inclusions,
                                                 boolean matchAnyExclusions,
                                                 java.util.Set<java.lang.Class<?>> exclusions)

    - #### describe

          public java.lang.String describe()

      Description copied from class: `Filter`
      Returns a textual description of this Filter
      Specified by:
        `describe` in class `Filter`
      Returns:
        a textual description of this Filter
      See Also:
        `toString()`

    - #### toString

          public java.lang.String toString()

      Returns string in the form `"[included categories] - [excluded categories]"`, where both sets have comma separated names of categories.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        string representation for the relative complement of excluded categories set in the set of included categories. Examples:
        - `"categories [all]"` for all included categories and no excluded ones;
        - `"categories [all] - [A, B]"` for all included categories and given excluded ones;
        - `"categories [A, B] - [C, D]"` for given included categories and given excluded ones.
      See Also:
        `name of category`

    - #### shouldRun

          public boolean shouldRun(Description description)

      Specified by:
        `shouldRun` in class `Filter`
      Parameters:
        `description` - the description of the test to be run
      Returns:
        `true` if the test should be run