* experiment with data structures for keeping/checking file trees in memory

This commit is contained in:
Reinhard Pointner 2015-04-09 18:47:14 +00:00
parent 1ea92011a3
commit 0a7a3c36bf
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ public class FileSet extends AbstractSet<Path> {
return add(getPath(e));
}
public void feed(Stream<? extends Object> stream) {
stream.forEach(path -> add(path.toString()));
}
private boolean contains(Path e, int depth) {
// add new leaf element
if (e.getNameCount() - depth == 1) {