Package ca.phon.util.resources
Class FolderHandler<T>
java.lang.Object
ca.phon.util.resources.FileHandler<T>
ca.phon.util.resources.FolderHandler<T>
- All Implemented Interfaces:
ResourceHandler<T>
,Iterable<T>
- Direct Known Subclasses:
BasicSyllabifierFolderHandler
,UserAnalysisHandler
,UserFolderScriptHandler
,UserMacroHandler
,UserReportHandler
Scans a folder for files. Scanning can be recursive and
use a filter.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the current file filterboolean
Is scanning recursiveiterator()
Return an iterator for instances of type T.void
setFileFilter
(FileFilter filter) Set file filtervoid
setRecursive
(boolean recursive) Set recursive scanningMethods inherited from class ca.phon.util.resources.FileHandler
addFile, getFiles, loadFromFile, removeFile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FolderHandler
Constructor- Parameters:
folder
- the folder to scan
-
-
Method Details
-
getRecursive
public boolean getRecursive()Is scanning recursive- Returns:
- boolean
-
setRecursive
public void setRecursive(boolean recursive) Set recursive scanning- Parameters:
recursive
-
-
getFileFilter
Get the current file filter- Returns:
- FileFilter
-
setFileFilter
Set file filter- Parameters:
filter
-
-
iterator
Description copied from interface:ResourceHandler
Return an iterator for instances of type T.- Specified by:
iterator
in interfaceIterable<T>
- Specified by:
iterator
in interfaceResourceHandler<T>
- Overrides:
iterator
in classFileHandler<T>
- Returns:
- an iterator providing instances of the parameterized type
-