public static <NodeType extends IGraphNode<NodeType>> Collection<NodeType> collectParents(
      final NodeType node, final INodeFilter<NodeType> filter) {
    Preconditions.checkNotNull(node, "Error: Node argument can't be null");

    return collectNodes(node.getParents(), filter);
  }
Finds all parents of a given node that pass the check by a given node filter.

@param <NodeType> The type of the nodes in the graph.
@param node The child node of all the parent nodes.
@param filter The filter that provides the node check.
@return All parent nodes of the child node that passed the filter check.
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/graphs/GraphAlgorithms.java