title: Priority Queue <Double> vs Priority Queue <Node>
body: <p>Ok so I'm trying to use a java priority queue to sort nodes by the double val they contain. I know how to do a priority queue by double but I need the rest of the node values for a huffman encoding tree construction. Is there a way to sort a priority queue of nodes by their val or would I be better off making the queue sort the double vals and then trying to match them to the nodes?</p>