org.apache.droids.net
Class RegexRule

Package class diagram package RegexRule
java.lang.Object
  extended by org.apache.droids.net.RegexRule

public abstract class RegexRule
extends Object

A generic regular expression rule.


Constructor Summary
protected RegexRule(boolean sign)
          Constructs a new regular expression rule.
 
Method Summary
protected  boolean accept()
          Return if this rule is used for filtering-in or out.
protected abstract  boolean match(String url)
          Checks if a url matches this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexRule

protected RegexRule(boolean sign)
Constructs a new regular expression rule.

Parameters:
sign - specifies if this rule must filter-in or filter-out. A true value means that any url matching this rule must be accepted, a false value means that any url matching this rule must be rejected.
Method Detail

accept

protected boolean accept()
Return if this rule is used for filtering-in or out.

Returns:
true if any url matching this rule must be accepted, otherwise false.

match

protected abstract boolean match(String url)
Checks if a url matches this rule.

Parameters:
url - is the url to check.
Returns:
true if the specified url matches this rule, otherwise false.


Copyright © 2008 The Apache Software Foundation