I need to store objects in a heap/priority queue. However, the objects may change so that their ordering changes, so fixUp or fixDown may need to be called on them. These methods are private and Java PriorityQueue wont let me do this. My options are:
use java PriorityQueue and remove and reinsert the object. Seems pretty inefficient, double the work.
Implement my own priority queue and maintain code that duplicates functionality in the Java standard library.
Which would be preferred method/best practice for doing this ? This sort of operations are needed to implement many graph algorithms eg. A*, so it is surprising Java does not let you do that.