private static <NodeType extends ZyGraphNode<?>> int internalFilterNodes(
      final AbstractZyGraph<NodeType, ?> graph,
      final Criterion filterBy,
      final Collection<NodeType> resultSet) {
    return internalFilterNodes(graph.getNodes(), filterBy, resultSet);
  }
Filter the nodes of an {@code AbstractZyGraph} that match a given filter criterion.

@param graph the graph containing the nodes to be filtered
@param filterBy the criterion to filter by
@param resultSet a {@code Collection} of nodes that match the specified criterion. If {@code
    null}, this method only counts the matching nodes.
@return The number of nodes in the graph matching the filter criterion
java/ui/src/main/java/com/google/security/zynamics/bindiff/graph/filter/GraphNodeFilter.java