org.oddjob.io
Class WildcardSpec

java.lang.Object
  extended by org.oddjob.io.WildcardSpec

public class WildcardSpec
extends Object


Constructor Summary
WildcardSpec(File file)
           
WildcardSpec(String spec)
           
 
Method Summary
 File[] findFiles()
           
 File[] findFiles(org.oddjob.io.WildcardSpec.DirectorySplit split)
           
static boolean match(String pattern, String str, boolean isCaseSensitive)
          Tests whether or not a string matches against a pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WildcardSpec

public WildcardSpec(String spec)

WildcardSpec

public WildcardSpec(File file)
Method Detail

findFiles

public File[] findFiles()

findFiles

public File[] findFiles(org.oddjob.io.WildcardSpec.DirectorySplit split)

match

public static boolean match(String pattern,
                            String str,
                            boolean isCaseSensitive)
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character

Parameters:
pattern - The pattern to match against. Must not be null.
str - The string which must be matched against the pattern. Must not be null.
isCaseSensitive - Whether or not matching should be performed case sensitively.
Returns:
true if the string matches against the pattern, or false otherwise.