List<RadComponent> (List<RadComponent> components) { RadComponent parent = null; for (RadComponent component : components) { if (parent == null) { parent = component.getParent(); } else if (parent != component.getParent()) { components = Collections.emptyList(); break; } } return components; }