Code example for PriorityQueue

Methods: poll

0
	/** 
	 * takes the best Node from the set and removes it from 
	 * the set 
	 */ 
	public Node removeBest() { 
		return set.poll();
	} 
 
	/** 
	 * Adds a node to the set, will overwrite if duplicated 
	 * @param node 
	 */ 
	public void add(Node node) {
		set.add(node);
	} 
 
	/** 
	 * Checks if there are no nodes in the set 
	 * @return 
	 */ 
	public boolean isEmpty() {