@Override
	public void bfs(String label, Function<Vertex, Vertex> action) {
		Vertex v = getVertex(label);
		if (v.wasVisited() == false) {
			v.setVisited(true);
			action.apply(v);
			pQueue.add(v);
		}
		
		JList<Vertex> listOfAdjacent = getEdges(mapOfVerticeIndex.get(v.getLabel()));
		for (Vertex neighbor : listOfAdjacent) {

			if (neighbor.wasVisited() == false) {
				neighbor.setVisited(true);
				action.apply(neighbor);
				pQueue.add(neighbor);
			}
		}

		if (pQueue.isEmpty())
			return;

		pQueue.remove();
		if (pQueue.isEmpty())
			return;
		bfs(pQueue.peek().getLabel(), action);
	}