Class FilesProviderWithDirectoryUnary
- Direct Known Subclasses:
LimitWithDirectory
,SampleWithDirectory
,SortAlphabeticallyWithDirectory
Like
FilesProviderWithDirectory
but employs a unary operator on a call to an existing
FilesProviderWithDirectory
.
It is assumed that the associated directory is not altered.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDirectoryAsPath
(InputContextParameters inputContext) The associated directory with the list of files.getFiles()
matchingFilesForDirectory
(Path directory, InputManagerParameters parameters) The matching files for this provider that exist in a particular directory.void
Transform an existing collection of files.Methods inherited from class org.anchoranalysis.io.input.bean.files.FilesProviderWithDirectory
create, getDirectoryAsPathEnsureAbsolute, rootDirectory
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
FilesProviderWithDirectoryUnary
public FilesProviderWithDirectoryUnary()
-
-
Method Details
-
matchingFilesForDirectory
public List<File> matchingFilesForDirectory(Path directory, InputManagerParameters parameters) throws FilesProviderException Description copied from class:FilesProviderWithDirectory
The matching files for this provider that exist in a particular directory.This directory may or may not be searched recursively, depending on implementation.
- Specified by:
matchingFilesForDirectory
in classFilesProviderWithDirectory
- Parameters:
directory
- the directory.parameters
- parameters passed to anInputManager
to generate input-objects.- Returns:
- a newly created list of matching files.
- Throws:
FilesProviderException
- if the operation is unable to complete successfully.
-
getDirectoryAsPath
Description copied from class:FilesProviderWithDirectory
The associated directory with the list of files.- Specified by:
getDirectoryAsPath
in classFilesProviderWithDirectory
- Parameters:
inputContext
- the input-context.- Returns:
- the associated directory, as a path.
-
transform
Transform an existing collection of files.Note that the incoming collection of files may be modified, and can no longer be used in its original form after this method call.
- Parameters:
source
- the incoming files (which may be consumed and modified).- Returns:
- the transformed (outgoing) files.
- Throws:
FilesProviderException
- if unable to complete the transform operation successfully.
-
getFiles
-
setFiles
-