org.apache.tapestry.util
Class RegexpMatcher

java.lang.Object
  extended by org.apache.tapestry.util.RegexpMatcher

public class RegexpMatcher
extends Object

Streamlines the interface to ORO by implicitly constructing the necessary compilers and matchers, and by caching compiled patterns.

Since:
3.0
Version:
$Id: RegexpMatcher.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
RegexpMatcher()
           
 
Method Summary
 void clear()
          Clears any previously compiled patterns.
protected  Pattern compilePattern(String pattern)
           
 boolean contains(String pattern, String input)
           
protected  Pattern getCompiledPattern(String pattern)
           
 String getEscapedPatternString(String pattern)
           
protected  PatternMatcher getPatternMatcher()
           
 boolean matches(String pattern, String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpMatcher

public RegexpMatcher()
Method Detail

compilePattern

protected Pattern compilePattern(String pattern)

getCompiledPattern

protected Pattern getCompiledPattern(String pattern)

clear

public void clear()
Clears any previously compiled patterns.


getPatternMatcher

protected PatternMatcher getPatternMatcher()

matches

public boolean matches(String pattern,
                       String input)

contains

public boolean contains(String pattern,
                        String input)

getEscapedPatternString

public String getEscapedPatternString(String pattern)