Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.util
Class WildCardFilter  view WildCardFilter download WildCardFilter.java

java.lang.Object
  extended bycom.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.


Field Summary
(package private)  java.lang.String filter
           
 
Constructor Summary
WildCardFilter(java.lang.String filter)
          Class constructor
 
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
 

Field Detail

filter

java.lang.String filter
Constructor Detail

WildCardFilter

public WildCardFilter(java.lang.String filter)
Class constructor

Method Detail

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 "*"