Set<MavenDomProjectModel> (@NotNull final MavenDomProjectModel projectDom) { final Set<MavenDomProjectModel> parents = new HashSet<>(); Processor<MavenDomProjectModel> collectProcessor = model -> { parents.add(model); return false; }; processParentProjects(projectDom, collectProcessor); return parents; }