com.cafesoft.core.regex
Interface RegexFilter

All Known Implementing Classes:
StandardRegexFilter

public interface RegexFilter

RegexFilter defines the interface for a regular expression pattern matching filter that uses inclusion and exclusion patterns.

Since:
01/17/2011

Method Summary
 void addExclusionRegex(Pattern pattern)
          Add a regular expression to the exclusion filter.
 void addInclusionRegex(Pattern pattern)
          Add a regular expression to the inclusion filter.
 boolean isExcluded(String value)
          Check a String for a match with at least one exclusion pattern.
 boolean isIncluded(String value)
          Check a String for a match with at least one inclusion pattern.
 boolean isIncludedNotExcluded(String value)
          Check a String for a match with at least one inclusion pattern, but no matches with an exclusion pattern.
 

Method Detail

addInclusionRegex

void addInclusionRegex(Pattern pattern)
Add a regular expression to the inclusion filter.

Parameters:
pattern - the regular expression to be added as an inclusion pattern.

addExclusionRegex

void addExclusionRegex(Pattern pattern)
Add a regular expression to the exclusion filter.

Parameters:
pattern - the regular expression to be added as an exclusion pattern.

isIncluded

boolean isIncluded(String value)
Check a String for a match with at least one inclusion pattern.

Parameters:
value - the String to be checked for a match.
Returns:
true if the String matches at least one inclusion regular expression, else false.

isExcluded

boolean isExcluded(String value)
Check a String for a match with at least one exclusion pattern.

Parameters:
value - the String to be checked for a match.
Returns:
true if the String matches at least one exclusion regular expression, else false.

isIncludedNotExcluded

boolean isIncludedNotExcluded(String value)
Check a String for a match with at least one inclusion pattern, but no matches with an exclusion pattern.

Parameters:
value - the String to be checked for a match.
Returns:
true if the String matches at least one inclusion regular expression and does not match any exclusion regular expressions.


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.