void (Filter @NotNull [] filters) { Collection<AbstractTreeNode<?>> children = getChildren(); for (Filter filter : filters) { for (Iterator<AbstractTreeNode<?>> eachNode = children.iterator(); eachNode.hasNext();) { AbstractTreeNode eachChild = eachNode.next(); Object value = eachChild.getValue(); if (!(value instanceof TreeElement) || !filter.isVisible((TreeElement)value)) { eachNode.remove(); } } } setChildren(children); }