I was wondering why Java's Priority Queue does not support the ChangePriority. I have read somewhere (with no details) that dropping ChangePriority allows one to use more efficient implementation, but have no idea how it could be possible - binary heap seems quite simple/efficient data structure - can't see any space for improvement. Another clue could be that it might take awkward interface to indicate to the PQ which element (presumably a position in the heap) changes its priority, but still I am novice to Java to come up with a conclusion.
Edit: Why this could be not a pointless question? If you are new to Java (especially from C/C++ background) you start wondering about things like where did all the pointers go, or how do I implement Dijkstra in Java etc.
The first question has been answered many times the second one doesn't have, as far as I understand it, a simple answer. One could expect that in such a language like Java you have all the usual programming tools ready at hand, working out of the box, encapsulated in a nice class wrapper. But suddenly you have to implement by yourself a PQ with decrease key method, which perhaps is an more awkward thing to do in Java then in C/C++. In this question I'm not asking how to implement Dijkstra (this has been nicely answered in some other thread). There still could be many applications of PQ which can't be sorted out without a decrease key/prio method, eg. if there are far more priority updates then items in PQ. In Dijkstra there are at most V
So one might expect that there is some serious reasons why Java's PQ lacks change priority. The reasons are probably interesting in their own regardless of actual Java's PQ interface.