Code example for PriorityQueue

package Solver; 
import java.util.Comparator; 
import java.util.PriorityQueue; 
public class OpenSet<Node> { 
	private final PriorityQueue<Node> set;
	public OpenSet() { 
		set = new PriorityQueue<Node>();
	public OpenSet(Comparator<Node> comp) {
		set = new PriorityQueue<Node>(32, comp);
	 * takes the best Node from the set and removes it from 
	 * the set 
	public Node removeBest() { 
		return set.poll();
Stop searching for code, let great code find you!  Add Codota to your java IDE