|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.armatiek.infofuze.stream.filesystem.filefilter.PrefixFileFilter
public class PrefixFileFilter
Filters filenames for a certain prefix.
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 | |
|---|---|
PrefixFileFilter(java.util.List<java.lang.String> prefixes)
Constructs a new Prefix file filter for a list of prefixes. |
|
PrefixFileFilter(java.util.List<java.lang.String> prefixes,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Prefix file filter for a list of prefixes specifying case-sensitivity. |
|
PrefixFileFilter(java.lang.String prefix)
Constructs a new Prefix file filter for a single prefix. |
|
PrefixFileFilter(java.lang.String[] prefixes)
Constructs a new Prefix file filter for any of an array of prefixes. |
|
PrefixFileFilter(java.lang.String[] prefixes,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Prefix file filter for any of an array of prefixes specifying case-sensitivity. |
|
PrefixFileFilter(java.lang.String prefix,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Prefix file filter for a single prefix specifying case-sensitivity. |
|
| Method Summary | |
|---|---|
boolean |
accept(FileIf file)
Checks to see if the filename starts with the prefix. |
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 PrefixFileFilter(java.lang.String prefix)
prefix - the prefix to allow, must not be null
java.lang.IllegalArgumentException - if the prefix is null
public PrefixFileFilter(java.lang.String prefix,
org.apache.commons.io.IOCase caseSensitivity)
prefix - the prefix to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the prefix is nullpublic PrefixFileFilter(java.lang.String[] prefixes)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
prefixes - the prefixes to allow, must not be null
java.lang.IllegalArgumentException - if the prefix array is null
public PrefixFileFilter(java.lang.String[] prefixes,
org.apache.commons.io.IOCase caseSensitivity)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
prefixes - the prefixes to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the prefix is nullpublic PrefixFileFilter(java.util.List<java.lang.String> prefixes)
prefixes - the prefixes to allow, must not be null
java.lang.IllegalArgumentException - if the prefix list is null
java.lang.ClassCastException - if the list does not contain Strings
public PrefixFileFilter(java.util.List<java.lang.String> prefixes,
org.apache.commons.io.IOCase caseSensitivity)
prefixes - the prefixes to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the prefix 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 | |||||||||