Package com.jitlogic.zorka.common.util

Examples of com.jitlogic.zorka.common.util.StringMatcher


public class StringMatcherUnitTest {

    @Test
    public void testMatchCasesWithExcludeRules() throws Exception {
        StringMatcher m = new StringMatcher(null,
                Arrays.asList("aaa", "bbb", "~cc.*cc", "~ddd"));

        assertFalse(m.matches("aaa"));
        assertTrue(m.matches("aa"));
        assertFalse(m.matches("bbb"));
        assertTrue(m.matches("ccaac"));
        assertFalse(m.matches("ccaacc"));
        assertFalse(m.matches("ddd"));
    }
View Full Code Here


    }


    @Test
    public void testMatchWithIncludeRules() throws Exception {
        StringMatcher m = new StringMatcher(
                Arrays.asList("~a.*"),
                Arrays.asList("aaa", "bbb"));

        assertTrue(m.matches("aa"));
        assertFalse(m.matches("aaa"));
        assertFalse(m.matches("bbb"));
        assertFalse(m.matches("ccc"));
    }
View Full Code Here

    private StringMatcher matcher;


    public StringMatcherProcessor(String srcField, List<String> includes, List<String> excludes) {
        this.srcField = srcField;
        matcher = new StringMatcher(includes, excludes);
    }
View Full Code Here

        return ZorkaUtil.strClock(clock);
    }


    public StringMatcher stringMatcher(List<String> includes, List<String> excludes) {
        return new StringMatcher(includes, excludes);
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.common.util.StringMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.