Package de.mhus.lib.core.matcher
Class Matcher
- java.lang.Object
-
- de.mhus.lib.core.matcher.Matcher
-
public class Matcher extends Object
Matches a single value against a condition. The Matcher will compile the condition and speedup if you use the same condition often. Syntax: [ [type] [not] pattern ]* with operator. Types: - fs - file sysytem like pattern with * - sql - sql like pattern with % - regex (default) - regular expression Operators: - and, && - And - or, || - Or - Brackets - How brackets work ... - not, ! as negative operator e.g. .*aaa.* .*aaa.* or .*bbb.* .*aaa.* and .*bbb.* .*aaa.* and not .*bbb.* not (.*aaa.* or .*bbb.*) .*xyz.* or (.*aaa.* and .*bbb.*) fs *aaa* sql %aaa%- Author:
- mikehummel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(String str)protected voidparse(StringTokenizerParser condition)StringtoString()
-
-
-
Constructor Detail
-
Matcher
public Matcher(String condition) throws de.mhus.lib.errors.MException
- Throws:
de.mhus.lib.errors.MException
-
-
Method Detail
-
matches
public boolean matches(String str)
-
parse
protected void parse(StringTokenizerParser condition) throws de.mhus.lib.errors.MException
- Throws:
de.mhus.lib.errors.MException
-
-