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

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

    for (final NodeType zyGraphNode : nodes) {
      successors.addAll(getSuccessors(zyGraphNode));
    }

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

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