CanonicalPathMap (Collection<String> recursive, Collection<String> flat) { NavigableSet<String> recursiveSet = StreamEx.of(recursive).into(WatchRootsUtil.createFileNavigableSet()); NavigableSet<String> flatSet = StreamEx.of(flat).into(WatchRootsUtil.createFileNavigableSet()); CanonicalPathMap pathMap = new CanonicalPathMap(recursiveSet, flatSet, WatchRootsUtil.createMappingsNavigableSet()); pathMap.getCanonicalWatchRoots(); return pathMap; }