code: public static <V extends Vertex<V, E>, E extends Edge<V, E>> boolean hasDisconnectedSubgraph(
  			Graph<V, E> graph) {
  		requireNonNull(graph, "The given graph is null");
  		Set<V> vertices = graph.getVertices();
  		if ((vertices == null) || (vertices.isEmpty())) {
  			/*
  			 * An empty graph has no disconnected sub graphs...
  			 */
  			return false;
  		}
  		Set<V> notVisited = new HashSet<>(vertices);
  		visitReachableGraph(notVisited.iterator().next(), new Stack<>(),
  				notVisited);
  		return !notVisited.isEmpty();
  	}
docs: This method searches a given {@link Graph} for disconnected subgraphs.
  
  @param <V>
  is the actual vertex implementation.
  @param <E>
  is the actual edge implementation.
  @param graph
  is the {@link Graph} to be searched for disconnected
  subgraphs.
  @return <code>true</code> is returned if a disconnected subgraph (vertex)
  was found. <code>false</code> is returned otherwise.