java.lang.Object
com.trapezium.util.WildCardFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
- public class WildCardFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
Limited support for wild card file names on the command line.
|
Method Summary |
boolean |
accept(java.io.File dir,
java.lang.String name)
Does the filter accept a file with a specific name? |
(package private) boolean |
filterAccepts(char x,
int filterIdx)
Check if the filter at its specific offset accepts a particular character. |
(package private) boolean |
filterIsQuestion(int filterIdx)
Check if the character at the indicated offset is a single character wild card |
(package private) boolean |
filterIsWild(int filterIdx)
Check if the character at the indicated offset in the filter is a wild card |
static boolean |
isWild(java.lang.String s)
Does the string indicate a wild card? Checks for '*' or '?' |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filter
java.lang.String filter
WildCardFilter
public WildCardFilter(java.lang.String filter)
- Class constructor
isWild
public static boolean isWild(java.lang.String s)
- Does the string indicate a wild card? Checks for '*' or '?'
accept
public boolean accept(java.io.File dir,
java.lang.String name)
- Does the filter accept a file with a specific name?
- Specified by:
accept in interface java.io.FilenameFilter
filterIsWild
boolean filterIsWild(int filterIdx)
- Check if the character at the indicated offset in the filter is a wild card
filterIsQuestion
boolean filterIsQuestion(int filterIdx)
- Check if the character at the indicated offset is a single character wild card
filterAccepts
boolean filterAccepts(char x,
int filterIdx)
- Check if the filter at its specific offset accepts a particular character.
The filter accepts the character if it is identical, or the indicated filter
character is a "*"