|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.armatiek.infofuze.stream.filesystem.filefilter.WildcardFileFilter
public class WildcardFileFilter
Filters files using the supplied wildcards.
Based on code from Apache Commons IO version 2.01.
The main difference is that this class filters objects that
implement FileIf
,
not File
.
Original author Jason Anderson
Constructor Summary | |
---|---|
WildcardFileFilter(java.util.List<java.lang.String> wildcards)
Construct a new case-sensitive wildcard filter for a list of wildcards. |
|
WildcardFileFilter(java.util.List<java.lang.String> wildcards,
org.apache.commons.io.IOCase caseSensitivity)
Construct a new wildcard filter for a list of wildcards specifying case-sensitivity. |
|
WildcardFileFilter(java.lang.String wildcard)
Construct a new case-sensitive wildcard filter for a single wildcard. |
|
WildcardFileFilter(java.lang.String[] wildcards)
Construct a new case-sensitive wildcard filter for an array of wildcards. |
|
WildcardFileFilter(java.lang.String[] wildcards,
org.apache.commons.io.IOCase caseSensitivity)
Construct a new wildcard filter for an array of wildcards specifying case-sensitivity. |
|
WildcardFileFilter(java.lang.String wildcard,
org.apache.commons.io.IOCase caseSensitivity)
Construct a new wildcard filter for a single wildcard specifying case-sensitivity. |
Method Summary | |
---|---|
boolean |
accept(FileIf file)
Checks to see if the filename matches one of the wildcards. |
java.lang.String |
toString()
Provide a String representaion of this file filter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WildcardFileFilter(java.lang.String wildcard)
wildcard
- the wildcard to match
java.lang.IllegalArgumentException
- if the pattern is nullpublic WildcardFileFilter(java.lang.String wildcard, org.apache.commons.io.IOCase caseSensitivity)
wildcard
- the wildcard to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException
- if the pattern is nullpublic WildcardFileFilter(java.lang.String[] wildcards)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
wildcards
- the array of wildcards to match
java.lang.IllegalArgumentException
- if the pattern array is nullpublic WildcardFileFilter(java.lang.String[] wildcards, org.apache.commons.io.IOCase caseSensitivity)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
wildcards
- the array of wildcards to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException
- if the pattern array is nullpublic WildcardFileFilter(java.util.List<java.lang.String> wildcards)
wildcards
- the list of wildcards to match, not null
java.lang.IllegalArgumentException
- if the pattern list is null
java.lang.ClassCastException
- if the list does not contain Stringspublic WildcardFileFilter(java.util.List<java.lang.String> wildcards, org.apache.commons.io.IOCase caseSensitivity)
wildcards
- the list of wildcards to match, not nullcaseSensitivity
- how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException
- if the pattern list is null
java.lang.ClassCastException
- if the list does not contain StringsMethod Detail |
---|
public boolean accept(FileIf file)
accept
in interface IOFileFilter
file
- the file to check
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |