title: Updating Java PriorityQueue when its elements change priority
body: <p>I'm trying to use a <code>PriorityQueue</code> to order objects using a <code>Comparator</code>.</p>
  
  <p>This can be achieved easily, but the objects class variables (with which the comparator calculates priority) may change after the initial insertion. Most people have suggested the simple solution of removing the object, updating the values and reinserting it again, as this is when the priority queue's comparator is put into action.</p>
  
  <p>Is there a better way other than just creating a wrapper class around the PriorityQueue to do this?</p>