|
JBoss VFS 3.0.1.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.vfs.util.ExtensibleFilter
public class ExtensibleFilter
An extensible filter for VFS files. Three arrays are maintained for checking: a prefix, suffix, and match array. If the filename starts with any of the prefixes, ends with any of the suffixes, or exactly matches any of the matches, then the accepts method will return false.
NOTE: the arrays *must* be sorted for the string matching to work, and suffixes use the 'reverseComparator'
Constructor Summary | |
---|---|
ExtensibleFilter()
Use the default values for suffixes, prefixes, and matches |
|
ExtensibleFilter(String[] matches,
String[] prefixes,
String[] suffixes)
Create using a custom set of matches, prefixes, and suffixes. |
Method Summary | |
---|---|
boolean |
accepts(VirtualFile file)
If the filename matches any string in the prefix, suffix, or matches array, return false. |
void |
addPrefix(String prefix)
|
void |
addPrefixes(String[] prefixes)
|
void |
addSuffix(String suffix)
|
void |
addSuffixes(String[] suffixes)
|
void |
delPrefix(String prefix)
|
void |
delPrefixes(String[] prefixes)
|
void |
delSuffix(String suffix)
|
void |
delSuffixes(String[] suffixes)
|
String[] |
getMatches()
|
String[] |
getPrefixes()
|
String[] |
getSuffixes()
|
void |
setMatches(String[] matches)
|
void |
setPrefixes(String[] prefixes)
|
void |
setSuffixes(String[] suffixes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtensibleFilter()
public ExtensibleFilter(String[] matches, String[] prefixes, String[] suffixes)
matches
- the matchesprefixes
- the prefixessuffixes
- the suffixesMethod Detail |
---|
public void addPrefix(String prefix)
public void addPrefixes(String[] prefixes)
public void delPrefix(String prefix)
public void delPrefixes(String[] prefixes)
public void addSuffix(String suffix)
public void addSuffixes(String[] suffixes)
public void delSuffix(String suffix)
public void delSuffixes(String[] suffixes)
public String[] getSuffixes()
public void setSuffixes(String[] suffixes)
public String[] getPrefixes()
public void setPrefixes(String[] prefixes)
public String[] getMatches()
public void setMatches(String[] matches)
public boolean accepts(VirtualFile file)
accepts
in interface VirtualFileFilter
file
- The file to be tested
false
if the filename matches any of the prefixes, suffixes, or matches.
|
JBoss VFS 3.0.1.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |