de.unkrig.commons.file.fileprocessing
Class SelectiveFileProcessor<T>
java.lang.Object
de.unkrig.commons.file.fileprocessing.SelectiveFileProcessor<T>
- Type Parameters:
T - Type returned by process(String, File)
- All Implemented Interfaces:
- FileProcessor<T>
public class SelectiveFileProcessor<T>
- extends java.lang.Object
- implements FileProcessor<T>
Passes to a delegate only the files who's path matches a given predicate.
|
Method Summary |
T |
process(java.lang.String path,
java.io.File file)
Do 'something' with the given file. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SelectiveFileProcessor
public SelectiveFileProcessor(Predicate<java.lang.String> pathPredicate,
FileProcessor<T> delegate1,
FileProcessor<T> delegate2)
process
@Nullable
public T process(java.lang.String path,
java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
- Description copied from interface:
FileProcessor
- Do 'something' with the given file.
- Specified by:
process in interface FileProcessor<T>
- Parameters:
path - The string that characterizes the file
- Throws:
java.io.FileNotFoundException
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object