Package repast.simphony.batch.ssh
Class MatchedFiles
- java.lang.Object
-
- repast.simphony.batch.ssh.MatchedFiles
-
public class MatchedFiles extends Object
A collection of files that match some specified file pattern.- Author:
- Nick Collier
- See Also:
OutputFinder
-
-
Constructor Summary
Constructors Constructor Description MatchedFiles(OutputPattern pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllFiles(Collection<File> files)
Adds all the files as matched files.void
addFile(File file)
Adds the specified file as a match.void
aggregateOutput(String outputDir)
Aggregates all the files into this MatchedFiles output file written to the specified directory.List<File>
getFiles()
Gets a List of the matched files.OutputPattern
getPattern()
Gets the OutputPattern associated with this MatchedFiles.boolean
isEmpty()
Gets whether or not this MatchedFiles collection has any files.boolean
matches(Path path)
Gets whether or not the path matches this MatchedFiles pattern.
-
-
-
Constructor Detail
-
MatchedFiles
public MatchedFiles(OutputPattern pattern)
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Gets whether or not this MatchedFiles collection has any files.- Returns:
- true if this has no files, otherwise false.
-
getPattern
public OutputPattern getPattern()
Gets the OutputPattern associated with this MatchedFiles.- Returns:
-
matches
public boolean matches(Path path)
Gets whether or not the path matches this MatchedFiles pattern.- Parameters:
path
-- Returns:
- true if there is a match otherwise false.
-
addFile
public void addFile(File file)
Adds the specified file as a match.- Parameters:
file
-
-
getFiles
public List<File> getFiles()
Gets a List of the matched files.- Returns:
- a List of the matched files.
-
addAllFiles
public void addAllFiles(Collection<File> files)
Adds all the files as matched files.- Parameters:
files
-
-
aggregateOutput
public void aggregateOutput(String outputDir) throws IOException
Aggregates all the files into this MatchedFiles output file written to the specified directory.- Parameters:
outputDir
-- Throws:
IOException
-
-