Package org.geotools.util
Class DefaultFileFilter
Object
FileFilter
DefaultFileFilter
- All Implemented Interfaces:
FileFilter,FilenameFilter
A
FileFilter implementation using Unix-style wildcards.- Since:
- 2.0
- Author:
- Martin Desruisseaux (IRD)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFileFilter(String pattern) Constructs a file filter for the specified pattern.DefaultFileFilter(String pattern, String description) Constructs a file filter for the specified pattern and description. -
Method Summary
-
Constructor Details
-
DefaultFileFilter
Constructs a file filter for the specified pattern. The pattern can contains the"*"and"?"wildcards.- Parameters:
pattern- The pattern (e.g."*.png").
-
DefaultFileFilter
Constructs a file filter for the specified pattern and description. The pattern can contains the"*"and"?"wildcards.- Parameters:
pattern- The pattern (e.g."*.png").description- The description of this filter, usually for graphical user interfaces.
-
-
Method Details
-
getDescription
Returns the description of this filter. For example:"PNG images".- Specified by:
getDescriptionin classFileFilter
-
accept
Tests if a specified file matches the pattern.- Specified by:
acceptin interfaceFileFilter- Specified by:
acceptin classFileFilter- Parameters:
file- The file to be tested.- Returns:
trueif and only if the name matches the pattern.
-
accept
Tests if a specified file matches the pattern.- Specified by:
acceptin interfaceFilenameFilter- Parameters:
directory- The directory in which the file was found.name- The name of the file.- Returns:
trueif and only if the name matches the pattern.
-