List<ProjectFileNode> (Object object) { Node node = object instanceof Node && isValidThread() ? (Node)object : null; if (node == null) return emptyList(); List<?> children = node.getChildren(); if (children.isEmpty()) return emptyList(); List<ProjectFileNode> result = new SmartList<>(); VirtualFileFilter filter = root.filter; for (Object child : children) { if (child instanceof FileNode && isVisible((FileNode)child, filter)) { result.add((FileNode)child); } } return result; }