Collection<XBreakpointGroup> (CheckedTreeNode parent) { Collection<XBreakpointGroup> nodes = new ArrayList<>(); Enumeration children = parent.children(); while (children.hasMoreElements()) { Object element = children.nextElement(); if (element instanceof BreakpointsGroupNode) { nodes.add(((BreakpointsGroupNode<?>)element).getGroup()); } } return nodes; }