public class FileListIterator extends AbstractPipeInputIterator
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
ALL_DIRECTORIES
Use as label names all the directory names in the filename.
|
static Pattern |
FIRST_DIRECTORY
Use as label names the first directory in the filename.
|
static Pattern |
LAST_DIRECTORY
Use as label name the last directory in the filename.
|
static Pattern |
STARTING_DIRECTORIES
Use as label names the directories of the given files,
optionally removing common prefix of all starting directories
|
parentInstance| Constructor and Description |
|---|
FileListIterator(File[] files,
FileFilter fileFilter,
Pattern targetPattern,
boolean removeCommonPrefix)
Construct an iterator over the given arry of Files
The instances constructed from the files are returned in the same order
as they appear in the given array
|
FileListIterator(File filelist,
FileFilter fileFilter,
Pattern targetPattern,
boolean removeCommonPrefix)
Construct a FileListIterator with the file containing the list of files, which
contains one filename per line.
|
FileListIterator(String[] filenames,
FileFilter fileFilter,
Pattern targetPattern,
boolean removeCommonPrefix) |
FileListIterator(String filelistName,
FileFilter fileFilter,
Pattern targetPattern,
boolean removeCommonPrefix) |
FileListIterator(String filelistName,
Pattern targetPattern) |
| Modifier and Type | Method and Description |
|---|---|
ArrayList |
getFileArray() |
boolean |
hasNext() |
File |
nextFile() |
Instance |
nextInstance() |
next, remove, setParentInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic static final Pattern STARTING_DIRECTORIES
public static final Pattern FIRST_DIRECTORY
public static final Pattern LAST_DIRECTORY
public static final Pattern ALL_DIRECTORIES
public FileListIterator(File[] files, FileFilter fileFilter, Pattern targetPattern, boolean removeCommonPrefix)
files - Array of files from which to construct instancesfileFilter - class implementing interface FileFilter that will decide which names to accept.
May be null.targetPattern - regex Pattern applied to the filename whose first parenthesized group
on matching is taken to be the target value of the generated instance.
The pattern is applied to the filename with the matcher.find() method.removeCommonPrefix - boolean that modifies the behavior of the STARTING_DIRECTORIES
pattern, removing the common prefix of all initially specified
directories, leaving the remainder of each filename as the target value.public FileListIterator(String[] filenames, FileFilter fileFilter, Pattern targetPattern, boolean removeCommonPrefix)
public FileListIterator(File filelist, FileFilter fileFilter, Pattern targetPattern, boolean removeCommonPrefix) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic FileListIterator(String filelistName, FileFilter fileFilter, Pattern targetPattern, boolean removeCommonPrefix) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic FileListIterator(String filelistName, Pattern targetPattern) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic Instance nextInstance()
nextInstance in interface PipeInputIteratornextInstance in class AbstractPipeInputIteratorpublic File nextFile()
public boolean hasNext()
hasNext in interface IteratorhasNext in class AbstractPipeInputIteratorpublic ArrayList getFileArray()
Copyright © 2019 JULIE Lab, Germany. All rights reserved.