Package 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:
  `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
  Description
  `ContainsString()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `filter(String string)`
  Filter strings that contain the contains attribute
  `void`
  `setContains(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 Details

  - ### ContainsString

    public ContainsString()

- ## Method Details

  - ### setContains

    public void setContains(String contains)
    the contains attribute
    Parameters:
      `contains` - the string that the token should contain

  - ### filter

    public String filter(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