if (filter instanceof AttributableFilter && ((AttributableFilter) filter).getType()==AttributableFilter.Type.NODE && ((AttributableFilter) filter).init(hgraph)) {
List<Node> nodeToRemove = new ArrayList<Node>();
AttributableFilter attributableFilter = (AttributableFilter) filter;
for (Node n : hgraph.getNodes().toArray()) {
if (attributableFilter.evaluate(hgraph, n)) {
nodeToRemove.add(n);
}
}
for (Node n : nodeToRemove) {
hgraph.removeNode(n);