Iterator<VirtualFile> (VirtualFile n) { Set<String> classesInCurrentRoot = fromClasses.get(n); return toClasses.entrySet().stream() .filter(entry -> ContainerUtil.intersects(entry.getValue(), classesInCurrentRoot)) .map(entry -> entry.getKey()) .collect(Collectors.toSet()).iterator(); }