Package org.lilyproject.indexer.model.indexerconf

Examples of org.lilyproject.indexer.model.indexerconf.TypePattern.matches()


        TypePattern pattern = new TypePattern("LIST<STRING>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LONG>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("FOO"));

        // no type arg
        pattern = new TypePattern("STRING");
View Full Code Here


        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LONG>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("FOO"));

        // no type arg
        pattern = new TypePattern("STRING");

        assertTrue(pattern.matches("STRING"));
View Full Code Here

        assertFalse(pattern.matches("FOO"));

        // no type arg
        pattern = new TypePattern("STRING");

        assertTrue(pattern.matches("STRING"));
        assertFalse(pattern.matches("STRING<STRING>"));

        // optional 1 nested type argument
        pattern = new TypePattern("LIST<*>");

 
View Full Code Here

        // no type arg
        pattern = new TypePattern("STRING");

        assertTrue(pattern.matches("STRING"));
        assertFalse(pattern.matches("STRING<STRING>"));

        // optional 1 nested type argument
        pattern = new TypePattern("LIST<*>");

        assertTrue(pattern.matches("LIST"));
View Full Code Here

        assertFalse(pattern.matches("STRING<STRING>"));

        // optional 1 nested type argument
        pattern = new TypePattern("LIST<*>");

        assertTrue(pattern.matches("LIST"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // this shows this can also match nested lists, which may go a bit beyond the purpose as this kind
        // of matching should serve to guarantee 1-level nested types. However, in practice this won't occur
View Full Code Here

        // optional 1 nested type argument
        pattern = new TypePattern("LIST<*>");

        assertTrue(pattern.matches("LIST"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // this shows this can also match nested lists, which may go a bit beyond the purpose as this kind
        // of matching should serve to guarantee 1-level nested types. However, in practice this won't occur
        // since a list always has a type argument.
View Full Code Here

        // optional 1 nested type argument
        pattern = new TypePattern("LIST<*>");

        assertTrue(pattern.matches("LIST"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // this shows this can also match nested lists, which may go a bit beyond the purpose as this kind
        // of matching should serve to guarantee 1-level nested types. However, in practice this won't occur
        // since a list always has a type argument.
        assertTrue(pattern.matches("LIST<LIST>"));
View Full Code Here

        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // this shows this can also match nested lists, which may go a bit beyond the purpose as this kind
        // of matching should serve to guarantee 1-level nested types. However, in practice this won't occur
        // since a list always has a type argument.
        assertTrue(pattern.matches("LIST<LIST>"));

        // exactly 1 nested type argument
        pattern = new TypePattern("LIST<+>");

        assertTrue(pattern.matches("LIST<STRING>"));
View Full Code Here

        assertTrue(pattern.matches("LIST<LIST>"));

        // exactly 1 nested type argument
        pattern = new TypePattern("LIST<+>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // optionally any number of nested type arguments, including 0
        pattern = new TypePattern("LIST<**>");
 
View Full Code Here

        // exactly 1 nested type argument
        pattern = new TypePattern("LIST<+>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));

        // optionally any number of nested type arguments, including 0
        pattern = new TypePattern("LIST<**>");

 
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.