public static <NodeType extends IGraphNode<NodeType>> Set<NodeType> getPredecessors(
      final IGraphNode<NodeType> node) {
    Preconditions.checkNotNull(node, "Error: Start node can't be null");

    final HashSet<NodeType> predecessors = new HashSet<NodeType>();
    final HashSet<NodeType> visited = new HashSet<NodeType>();

    getPredecessors(node, predecessors, visited);

    return predecessors;
  }
Finds all predecessors of a node. Those are all the nodes that have a direct or indirect path
to the node.

@param <NodeType> The type parameter that specifies the type of the nodes in the graph.
@param node The start node.
@return A list containing all predecessor nodes of the node.
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/graphs/GraphAlgorithms.java