Package docking.widgets.table.constraint
Class StringMatcherColumnConstraint
- java.lang.Object
-
- docking.widgets.table.constraint.StringColumnConstraint
-
- docking.widgets.table.constraint.StringMatcherColumnConstraint
-
- All Implemented Interfaces:
ColumnConstraint<java.lang.String>
,java.lang.Comparable<ColumnConstraint<java.lang.String>>
public class StringMatcherColumnConstraint extends StringColumnConstraint
String column constraint for matching column values if they match a full regular expression pattern.
-
-
Field Summary
-
Fields inherited from class docking.widgets.table.constraint.StringColumnConstraint
matchesPattern
-
-
Constructor Summary
Constructors Constructor Description StringMatcherColumnConstraint(java.lang.String spec)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnConstraint<java.lang.String>
copy(java.lang.String newPatternString)
subclasses must override to generate new versions of themselves but with a new pattern string.protected java.util.regex.Pattern
generateFindsPattern()
protected java.util.regex.Pattern
generateMatchesPattern(java.lang.String patternString)
java.lang.String
getName()
Returns the name of the constraintboolean
isValidPatternString(java.lang.String value)
-
Methods inherited from class docking.widgets.table.constraint.StringColumnConstraint
accepts, equals, getColumnType, getConstraintValueString, getConstraintValueTooltip, getEditor, getGroup, getHighlightMatcher, getPatternString, hashCode, parseConstraintValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface docking.widgets.table.constraint.ColumnConstraint
asString, compareTo
-
-
-
-
Constructor Detail
-
StringMatcherColumnConstraint
public StringMatcherColumnConstraint(java.lang.String spec)
ConstructorThis class is for users to enter true regular expression which is why it creates a pattern directly without using the UserSearchUtils
- Parameters:
spec
- the string to use to create a "matcher" pattern.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:ColumnConstraint
Returns the name of the constraint- Returns:
- the name of the constraint.
-
copy
public ColumnConstraint<java.lang.String> copy(java.lang.String newPatternString)
Description copied from class:StringColumnConstraint
subclasses must override to generate new versions of themselves but with a new pattern string.- Specified by:
copy
in classStringColumnConstraint
- Parameters:
newPatternString
- the new string to use for creating the match pattern.- Returns:
- a new ColumnConstraint that is the same type as this constraint but with a new range defined.
-
generateMatchesPattern
protected java.util.regex.Pattern generateMatchesPattern(java.lang.String patternString)
- Specified by:
generateMatchesPattern
in classStringColumnConstraint
-
isValidPatternString
public boolean isValidPatternString(java.lang.String value)
- Overrides:
isValidPatternString
in classStringColumnConstraint
-
generateFindsPattern
protected java.util.regex.Pattern generateFindsPattern()
- Overrides:
generateFindsPattern
in classStringColumnConstraint
-
-