FileDocCategorySizeDatePackage
JavaUtilRegexCapabilities.javaAPI DocApache Lucene 2.1.01932Wed Feb 14 10:46:32 GMT 2007org.apache.lucene.search.regex

JavaUtilRegexCapabilities

public class JavaUtilRegexCapabilities extends Object implements RegexCapabilities
An implementation tying Java's built-in java.util.regex to RegexQuery. Note that because this implementation currently only returns null from {@link #prefix} that queries using this implementation will enumerate and attempt to {@link #match} each term for the specified field in the index.

Fields Summary
private Pattern
pattern
Constructors Summary
Methods Summary
public voidcompile(java.lang.String pattern)

    this.pattern = Pattern.compile(pattern);
  
public booleanequals(java.lang.Object o)

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    final JavaUtilRegexCapabilities that = (JavaUtilRegexCapabilities) o;

    if (pattern != null ? !pattern.equals(that.pattern) : that.pattern != null) return false;

    return true;
  
public inthashCode()

    return (pattern != null ? pattern.hashCode() : 0);
  
public booleanmatch(java.lang.String string)

    return pattern.matcher(string).lookingAt();
  
public java.lang.Stringprefix()

    return null;