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 java.lang.Object implements TextFilter
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.regex.PatternfilterPatternprotected java.lang.StringfilterText 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPatternTextFilter(java.lang.String filterText) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.regex.PatterncreatePattern()Subclasses must create thePatternthat will be used by this class when filtering.booleanequals(java.lang.Object obj)java.lang.StringgetFilterText()inthashCode()booleanmatches(java.lang.String text)abstract booleanmatches(java.lang.String text, java.util.regex.Pattern pattern)Subclasses implement this method for their usage of the given pattern (find vs.java.lang.StringtoString()- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface docking.widgets.filter.TextFilter
isSubFilterOf 
 - 
 
 - 
 
- 
- 
Method Detail
- 
createPattern
protected abstract java.util.regex.Pattern createPattern()
Subclasses must create thePatternthat will be used by this class when filtering.- Returns:
 - the pattern
 
 
- 
matches
public abstract boolean matches(java.lang.String text, java.util.regex.Pattern pattern)Subclasses implement this method for their usage of the given pattern (find vs. matches)- Parameters:
 text- the text to check against the patternpattern- the pattern used to match the text- Returns:
 - true if there is a match
 
 
- 
getFilterText
public java.lang.String getFilterText()
- Specified by:
 getFilterTextin interfaceTextFilter
 
- 
matches
public boolean matches(java.lang.String text)
- Specified by:
 matchesin interfaceTextFilter
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -