Package docking.widgets.filter
Class MatchesExactlyTextFilter
- java.lang.Object
-
- docking.widgets.filter.AbstractPatternTextFilter
-
- docking.widgets.filter.MatchesPatternTextFilter
-
- docking.widgets.filter.MatchesExactlyTextFilter
-
- All Implemented Interfaces:
TextFilter
public class MatchesExactlyTextFilter extends MatchesPatternTextFilter
A filter that will pass text when it matches exactly.
-
-
Field Summary
-
Fields inherited from class docking.widgets.filter.MatchesPatternTextFilter
allowGlobbing, caseSensitive
-
Fields inherited from class docking.widgets.filter.AbstractPatternTextFilter
filterPattern, filterText
-
-
Constructor Summary
Constructors Constructor Description MatchesExactlyTextFilter(java.lang.String filterText, boolean caseSensitive, boolean allowGlobbing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.regex.Pattern
createPattern()
Subclasses must create thePattern
that will be used by this class when filtering.boolean
isSubFilterOf(TextFilter filter)
Returns true if this filter is a more specific filter of the given filter.-
Methods inherited from class docking.widgets.filter.MatchesPatternTextFilter
equals, hashCode, matches
-
Methods inherited from class docking.widgets.filter.AbstractPatternTextFilter
getFilterText, matches, toString
-
-
-
-
Method Detail
-
createPattern
protected java.util.regex.Pattern createPattern()
Description copied from class:AbstractPatternTextFilter
Subclasses must create thePattern
that will be used by this class when filtering.- Specified by:
createPattern
in classAbstractPatternTextFilter
- Returns:
- the pattern
-
isSubFilterOf
public boolean isSubFilterOf(TextFilter filter)
Description copied from interface:TextFilter
Returns true if this filter is a more specific filter of the given filter. This is specific to the implementation. Some filters cannot be sub-filters of another filter, such as the 'matches exactly' filter. Contrastingly, a 'starts with' filter can have a sub-filter; for example, for a 'starts with' filter, 'cat' is a sub-filter of 'ca', as 'cat' starts with 'ca'.- Parameters:
filter
- the potential parent filter- Returns:
- true if this filter is a more specific filter of the given filter.
-
-