public static <NodeType extends IGraphNode<NodeType>> Collection<NodeType> getPredecessors(
      final Collection<NodeType> nodes) {
    Preconditions.checkNotNull(nodes, "Error: Nodes argument can't be null");

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

    for (final NodeType zyGraphNode : nodes) {
      predecessors.addAll(getPredecessors(zyGraphNode));
    }

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

@param <NodeType> The node type of all nodes in the collection.
@param nodes The collection of input nodes.
@return All predecessors of the input nodes.
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/graphs/GraphAlgorithms.java