HierarchicalGraph hgraph = (HierarchicalGraph) graph;
Filter filter = filters[0];
if (filter instanceof NodeFilter && ((NodeFilter) filter).init(hgraph)) {
NodeFilter nodeFilter = (NodeFilter) filter;
for (Node n : hgraph.getNodes().toArray()) {
if (nodeFilter.evaluate(hgraph, n)) {
hgraph.removeNode(n);
}
}
nodeFilter.finish();
}