Package org.lilyproject.indexer.model.indexerconf

Examples of org.lilyproject.indexer.model.indexerconf.WildcardPattern.match()


        WildcardPattern pattern = new WildcardPattern("*");
        Pair<Boolean, String> result = pattern.match("foo");
        assertTrue(result.getV1());
        assertEquals("foo", result.getV2());

        result = pattern.match("");
        assertTrue(result.getV1());
        assertEquals("", result.getV2());

        // first occurrence of star takes precedence
        pattern = new WildcardPattern("*foo*");
 
View Full Code Here


        assertTrue(result.getV1());
        assertEquals("", result.getV2());

        // first occurrence of star takes precedence
        pattern = new WildcardPattern("*foo*");
        result = pattern.match("barfoo*");
        assertTrue(result.getV1());
        assertEquals("bar", result.getV2());

        result = pattern.match("barfoobar");
        assertFalse(result.getV1());
View Full Code Here

        pattern = new WildcardPattern("*foo*");
        result = pattern.match("barfoo*");
        assertTrue(result.getV1());
        assertEquals("bar", result.getV2());

        result = pattern.match("barfoobar");
        assertFalse(result.getV1());
        assertNull(result.getV2());
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.