private Collection<Directory> collectExistingRoots(final Directory pNewRoot) {
        final Path parentPath = pNewRoot.getPath();
        final Collection<Directory> pathsToRebase = new LinkedList<>();
        dirs.entrySet().forEach(e -> {
            final Path childPath = e.getKey();
            if (childPath.startsWith(parentPath) && e.getValue().isRoot()) {
                pathsToRebase.add(e.getValue());
            }
        });
        return pathsToRebase;
    }
private Collection < Directory > collectExistingRoots ( final Directory pNewRoot ) { final Path parentPath = pNewRoot . getPath ( ) ; final Collection < Directory > pathsToRebase = new LinkedList < > ( ) ; dirs . entrySet ( ) . forEach ( e -> { final Path childPath = e . getKey ( ) ; if ( childPath . startsWith ( parentPath ) && e . getValue ( ) . isRoot ( ) ) { pathsToRebase . add ( e . getValue ( ) ) ; } } ) ; return pathsToRebase ; }
Collects all existing root directories which are children of the new root directory specified specified.

@param pNewRoot New root directory to match, must not be {@code null}
@return Collection of directories, never {@code null}.