Package docking.widgets.filter

# Class AbstractPatternTextFilter

java.lang.Object
docking.widgets.filter.AbstractPatternTextFilter

All Implemented Interfaces:
  `TextFilter`

Direct Known Subclasses:
  `FindsPatternTextFilter`, `MatchesPatternTextFilter`

public abstract class AbstractPatternTextFilter extends Object implements TextFilter

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Pattern`
  `filterPattern`
  `protected final String`
  `filterText`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractPatternTextFilter(String filterText)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract Pattern`
  `createPattern()`
  Subclasses must create the `Pattern` that will be used by this class when filtering.
  `boolean`
  `equals(Object obj)`
  `String`
  `getFilterText()`
  `int`
  `hashCode()`
  `boolean`
  `matches(String text)`
  `abstract boolean`
  `matches(String text, Pattern pattern)`
  Subclasses implement this method for their usage of the given pattern (find vs.
  `String`
  `toString()`

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

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

  ### Methods inherited from interface docking.widgets.filter.TextFilter

  `isSubFilterOf`

- ## Field Details

  - ### filterText

    protected final String filterText

  - ### filterPattern

    protected Pattern filterPattern

- ## Constructor Details

  - ### AbstractPatternTextFilter

    protected AbstractPatternTextFilter(String filterText)

- ## Method Details

  - ### createPattern

    protected abstract Pattern createPattern()
    Subclasses must create the `Pattern` that will be used by this class when filtering.
    Returns:
      the pattern

  - ### matches

    public abstract boolean matches(String text, Pattern pattern)
    Subclasses implement this method for their usage of the given pattern (find vs. matches)
    Parameters:
      `text` - the text to check against the pattern
      `pattern` - the pattern used to match the text
    Returns:
      true if there is a match

  - ### getFilterText

    public String getFilterText()
    Specified by:
      `getFilterText` in interface `TextFilter`

  - ### matches

    public boolean matches(String text)
    Specified by:
      `matches` in interface `TextFilter`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`