code: public static <V extends Vertex<V, E>, E extends Edge<V, E>> boolean hasDisconnectedSubgraph(
  			Graph<V, E> graph, V startVertex) {
  		requireNonNull(graph, "The given graph is null");
  		requireNonNull(startVertex, "The given start vertex is null");
  		if (!graph.getVertices().contains(startVertex)) {
  			throw new IllegalArgumentException("The given start vertex '"
  					+ startVertex + "' is not part of the given graph '"
  					+ graph + "'.");
  		}
  		HashSet<V> notVisited = new HashSet<V>(graph.getVertices());
  		visitReachableGraph(startVertex, new Stack<>(), notVisited);
  		return !notVisited.isEmpty();
  	}
docs: This method searches a given {@link Graph} for cycles. This method is
  different to {@link #hasDisconnectedSubgraph(Graph)}, because here it is
  started at a dedicated vertex and only vertices are checked for cycles
  which are connected to this start vertex. If disconnected subgraphs
  exist, these are not checked.
  
  @param <V>
  is the actual vertex implementation.
  @param <E>
  is the actual edge implementation.
  @param graph
  is the {@link Graph} to be searched for cycles.
  @param startVertex
  is the {@link Vertex} to start from. This vertex has to be
  part of the given graph.
  @return <code>true</code> is returned if a cycle was found.
  <code>false</code> is returned otherwise.
  @throws IllegalArgumentException
  is thrown in case the startVertex is not part of the graph or
  the graph of vertex are <code>null</code>.