SMILA 1.0 API documentation

org.eclipse.smila.importing.util
Class RegexPatternMatcher

java.lang.Object
  extended by org.eclipse.smila.importing.util.RegexPatternMatcher

public class RegexPatternMatcher
extends java.lang.Object

Checks if a string input is a match according to the given in- and exlude patterns. If include patterns are specified, at least one include pattern must match. If exclude pattern are specified, no exclude pattern must match. If no patterns are specified, every input string is a match.


Constructor Summary
RegexPatternMatcher()
           
 
Method Summary
 void addExcludePattern(java.lang.String regex)
          add an exclude pattern regex.
 void addIncludePattern(java.lang.String regex)
          add an include pattern regex.
 boolean isExcluded(java.lang.String input)
           
 boolean isIncluded(java.lang.String input)
           
 boolean matches(java.lang.String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexPatternMatcher

public RegexPatternMatcher()
Method Detail

matches

public boolean matches(java.lang.String input)
Returns:
true, if given input matches according to given in- and exclude patterns.

isIncluded

public boolean isIncluded(java.lang.String input)
Returns:
true, if given input matches include patterns, without caring about exclude patterns. If no include pattern is specified, everything will be included.

isExcluded

public boolean isExcluded(java.lang.String input)
Returns:
true, if given input matches at least one exclude patterns, without caring about include patterns. If no exclude pattern is specified, nothing will be included.

addIncludePattern

public void addIncludePattern(java.lang.String regex)
add an include pattern regex.


addExcludePattern

public void addExcludePattern(java.lang.String regex)
add an exclude pattern regex.


SMILA 1.0 API documentation