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

public abstract class FolderHandler<T> extends FileHandler<T>
Scans a folder for files. Scanning can be recursive and use a filter.
  • Constructor Details

    • FolderHandler

      public FolderHandler(File folder)
      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

      public FileFilter getFileFilter()
      Get the current file filter
      Returns:
      FileFilter
    • setFileFilter

      public void setFileFilter(FileFilter filter)
      Set file filter
      Parameters:
      filter -
    • iterator

      public Iterator<T> iterator()
      Description copied from interface: ResourceHandler
      Return an iterator for instances of type T.
      Specified by:
      iterator in interface Iterable<T>
      Specified by:
      iterator in interface ResourceHandler<T>
      Overrides:
      iterator in class FileHandler<T>
      Returns:
      an iterator providing instances of the parameterized type