Class 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
    • 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