FilterFilesUniqueNormalize - ViiSE/papka GitHub Wiki
FilterFilesUniqueNormalize<T> - filter in which duplicate files are collapsed into one file.
public FilterFilesUniqueNormalize(List<T> rawFiles)
List<String> rawFiles - list of full filename files.
List<String> rawFiles = new ArrayList<>();
rawFiles.add("/root1.txt");
rawFiles.add("/root2.txt");
rawFiles.add("/root2.txt");
rawFiles.add("/root2.txt");
rawFiles.add("/root3.txt");
rawFiles.add("/folder1/fl1.txt");
rawFiles.add("/folder1/fl1.txt");
rawFiles.add("/folder1/fl2.txt");
Filter<List<String>> filter = new FilterFilesUniqueNormalize<>(rawFiles);
List<String> files = filter.apply();
files.forEach(System.out::println)
Output:
/root1.txt
/root2.txt
/root3.txt
/folder1/fl1.txt
/folder1/fl2.txt
Filter - implementable interface.
Find - constructor argument.