- java.lang.Object
-
- snaq.util.jclap.FileOption.FileFilter
-
- All Implemented Interfaces:
StringOption.Filter
- Enclosing class:
- FileOption
public static final class FileOption.FileFilter extends Object implements StringOption.Filter
Implementation of anStringOption.Filterwhich filters based on existence and type of file to which the string refers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileOption.FileFilter.AcceptExistanceEnumeration of possible file existence states to accept.static classFileOption.FileFilter.AcceptFileTypeEnumeration of possible types to accept.
-
Constructor Summary
Constructors Constructor Description FileFilter(FileOption.FileFilter.AcceptExistance eType, FileOption.FileFilter.AcceptFileType fType)Creates a newFileOptioninstance (allows files/folders).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(String arg)Determines whether the string argument is valid as an option value.
-
-
-
Constructor Detail
-
FileFilter
public FileFilter(FileOption.FileFilter.AcceptExistance eType, FileOption.FileFilter.AcceptFileType fType)
Creates a newFileOptioninstance (allows files/folders).- Parameters:
eType- type of files to accept/reject based on existencefType- type of files to accept/reject based on file/directory status
-
-
Method Detail
-
accept
public boolean accept(String arg)
Determines whether the string argument is valid as an option value.- Specified by:
acceptin interfaceStringOption.Filter- Parameters:
arg- string argument to check for validity as an option value- Returns:
- Whether the string argument is valid as an option value.
-
-