001 package com.thaiopensource.datatype.xsd.regex;
002
003 /**
004 * A provider of a regular expression matching capability.
005 */
006 public interface RegexEngine {
007 /**
008 * Compiles a string containing a regular expression into a <code>Regex</code> object.
009 * The <code>Regex</code> object can be used to test whether a string matches the regular
010 * expression.
011 *
012 * @param str a String containing a regular expression
013 * @return a <code>Regex</code> for <code>str</code>
014 * @throws RegexSyntaxException if <code>str</code> is not a valid regular expression
015 */
016 Regex compile(String str) throws RegexSyntaxException;
017 }