Class SimplePatternSearcher
java.lang.Object
com.inductiveautomation.ignition.common.util.SimplePatternSearcher
- All Implemented Interfaces:
PatternSearcher
This class helps with "simple" pattern matching. That is, it will take a pattern and apply stars (*) and question
marks (?) to mean match any, and match one respectively.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.common.util.PatternSearcher
PatternSearcher.SubstringLocation
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePatternSearcher
(String pattern) SimplePatternSearcher
(String pattern, boolean matchLine) -
Method Summary
Modifier and TypeMethodDescriptionfind
(CharSequence input) boolean
matches
(CharSequence input) static boolean
matches
(String pattern, CharSequence input) void
setPattern
(String pattern) void
setPattern
(String pattern, boolean matchLine)
-
Constructor Details
-
SimplePatternSearcher
-
SimplePatternSearcher
-
-
Method Details
-
setPattern
-
setPattern
- Parameters:
pattern
- The pattern string to use. If null or blank, any string will match successfully.matchLine
- If true, the pattern will be applied to the whole string. If false, the pattern will get "*" appended to the front and back so that it matches mid-line.
-
getPattern
-
matches
- Specified by:
matches
in interfacePatternSearcher
-
find
- Specified by:
find
in interfacePatternSearcher
-
matches
-