List<PyComprehensionComponent> () { final List<PyComprehensionComponent> list = new ArrayList<>(5); visitComponents(new ComprehensionElementVisitor() { @Override void visitForComponent(PyComprehensionForComponent component) { list.add(component); } @Override void visitIfComponent(PyComprehensionIfComponent component) { list.add(component); } }); return list; }