org.apache.tools.ant.filters

## Class TokenFilter.ContainsString

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.filters.TokenFilter.ContainsString

- All Implemented Interfaces:
    java.lang.Cloneable, TokenFilter.Filter
  Enclosing class:
    TokenFilter

      public static class TokenFilter.ContainsString
      extends ProjectComponent
      implements TokenFilter.Filter

  Simple filter to filter lines contains strings

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContainsString()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `filter(java.lang.String string)` Filter strings that contain the contains attribute
    `void` | `setContains(java.lang.String contains)` the contains attribute

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`

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

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

- - ### Constructor Detail

    - #### ContainsString

          public ContainsString()

  - ### Method Detail

    - #### setContains

          public void setContains(java.lang.String contains)

      the contains attribute
      Parameters:
        `contains` - the string that the token should contain

    - #### filter

          public java.lang.String filter(java.lang.String string)

      Filter strings that contain the contains attribute
      Specified by:
        `filter` in interface `TokenFilter.Filter`
      Parameters:
        `string` - the string to be filtered
      Returns:
        null if the string does not contain "contains", string otherwise