@Override
	public boolean hasNext() {

		if (startVertex != null) {
			encounterStartVertex();
	    }
		
		if (!isConnectedComponentExhausted()) {
			return true;
		}
				
		if (state == ConnectedComponentState.WITHIN_COMPONENT) {
			state = ConnectedComponentState.AFTER_COMPONENT;			
			if (!traversalListeners.isEmpty()) {
				fireConnectedComponentFinished();
			}
		}
		
		if (!isCrossComponentTraversal) {
			return false;
		}
		
		while (vertexIterator.hasNext()) {
			Node vertex = vertexIterator.next();

			if (!visitedVertices.contains(vertex)) {
				encounterVertex(vertex);
				state = ConnectedComponentState.BEFORE_COMPONENT;
				return true;
			}
		}

		return false;	    
	}