Package org.apache.openjpa.lib.util

Examples of org.apache.openjpa.lib.util.SimpleRegex.matches()


        String wild = args[0].toString().replace('?', '.');
        for (int st = 0, i; (i = wild.indexOf("*", st)) != -1; st = i + 3)
            wild = wild.substring(0, i) + "." + wild.substring(i);

        SimpleRegex re = new SimpleRegex(wild, false);
        return (re.matches(target.toString())) ? Boolean.TRUE : Boolean.FALSE;
    }

    public Class getType(Class targetClass, Class[] argClasses) {
        return boolean.class;
    }
View Full Code Here


        // sequences into an escape that conforms to the regexp syntax
        str = Strings.replace(str, _multi, ".*");
        str = Strings.replace(str, _single, ".");

        SimpleRegex re = new SimpleRegex(str, uncase);
        boolean matches = re.matches(o1.toString());
        return _affirmation ? matches : !matches;
    }
}

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.