Set<RadComponent> (List<? extends RadComponent> components) { Set<RadComponent> parents = new HashSet<>(); for (RadComponent component : components) { RadComponent parent = component.getParent(); if (parent != null) { parents.add(parent); } } return parents; }