railo.commons.io.res.util
Class WildcardPattern

java.lang.Object
  extended by railo.commons.io.res.util.WildcardPattern

public class WildcardPattern
extends Object

a WildcardPattern that accepts a comma- (or semi-colon-) separated value of patterns, e.g. "*.gif, *.jpg, *.jpeg, *.png" and an optional isExclude boolean value which negates the results of the default implementation also, lines 31 - 35 allow to set isExclude to true by passing a pattern whose first character is an exclamation point '!'

Author:
Igal

Nested Class Summary
static class WildcardPattern.ParsedPattern
           
 
Constructor Summary
WildcardPattern(String pattern, boolean isCaseSensitive)
          calls this( pattern, isCaseSensitive, false );
WildcardPattern(String pattern, boolean isCaseSensitive, boolean isExclude)
           
 
Method Summary
 boolean isMatch(String input)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WildcardPattern

public WildcardPattern(String pattern,
                       boolean isCaseSensitive,
                       boolean isExclude)
Parameters:
pattern - - the wildcard pattern, or a comma/semi-colon separated value of wildcard patterns
isCaseSensitive - - if true, does a case-sensitive matching
isExclude - - if true, the filter becomes an Exclude filter so that only items that do not match the pattern are accepted

WildcardPattern

public WildcardPattern(String pattern,
                       boolean isCaseSensitive)
calls this( pattern, isCaseSensitive, false );

Method Detail

isMatch

public boolean isMatch(String input)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 Railo