|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.armatiek.infofuze.stream.filesystem.filefilter.NameFileFilter
public class NameFileFilter
Filters filenames for a certain name.
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 authors Stephen Colebourne, Federico Barbieri,
Serge Knystautas, Peter Donald
| Constructor Summary | |
|---|---|
NameFileFilter(java.util.List<java.lang.String> names)
Constructs a new case-sensitive name file filter for a list of names. |
|
NameFileFilter(java.util.List<java.lang.String> names,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new name file filter for a list of names specifying case-sensitivity. |
|
NameFileFilter(java.lang.String name)
Constructs a new case-sensitive name file filter for a single name. |
|
NameFileFilter(java.lang.String[] names)
Constructs a new case-sensitive name file filter for an array of names. |
|
NameFileFilter(java.lang.String[] names,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new name file filter for an array of names specifying case-sensitivity. |
|
NameFileFilter(java.lang.String name,
org.apache.commons.io.IOCase caseSensitivity)
Construct a new name file filter specifying case-sensitivity. |
|
| Method Summary | |
|---|---|
boolean |
accept(FileIf file)
Checks to see if the filename matches. |
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 NameFileFilter(java.lang.String name)
name - the name to allow, must not be null
java.lang.IllegalArgumentException - if the name is null
public NameFileFilter(java.lang.String name,
org.apache.commons.io.IOCase caseSensitivity)
name - the name to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the name is nullpublic NameFileFilter(java.lang.String[] names)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
names - the names to allow, must not be null
java.lang.IllegalArgumentException - if the names array is null
public NameFileFilter(java.lang.String[] names,
org.apache.commons.io.IOCase caseSensitivity)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
names - the names to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the names array is nullpublic NameFileFilter(java.util.List<java.lang.String> names)
names - the names to allow, must not be null
java.lang.IllegalArgumentException - if the name list is null
java.lang.ClassCastException - if the list does not contain Strings
public NameFileFilter(java.util.List<java.lang.String> names,
org.apache.commons.io.IOCase caseSensitivity)
names - the names to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the name list is null
java.lang.ClassCastException - if the list does not contain Strings| Method Detail |
|---|
public boolean accept(FileIf file)
accept in interface IOFileFilterfile - 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 | |||||||||