private static Children createFolderChildren(Folder folder) { for (FolderElement elem : folder.getElements()) { if (elem instanceof Folder) { return new FolderChildren(folder); } } return Children.LEAF; }
@Override public void addNotify() { List<Folder> result = new ArrayList<>(); for (FolderElement o : folder.getElements()) { if (o instanceof Folder) { result.add((Folder) o); } } this.setKeys(result); }