Code example for PriorityQueue

Methods: poll

0
		pQueue.add(newV); 
	} 
	 
	//This removes and returns the head of the queue 
	public Vertex remove(){ 
		return pQueue.poll(); 
	} 
	 
	//Look at the first value without removing 
	public Vertex peek(){ 
		return pQueue.peek(); 
	} 
	 
	public boolean hasMore(){ 
		return !pQueue.isEmpty(); 
	} 
	 
	//Have the queue reassess the position of a vertex in the graph 
	public void update(Vertex changeV){ 
		pQueue.remove(changeV); 
		pQueue.add(changeV);