I need this to implement Dijkstra's algorithm, and I have my own implementation, but documenting my code would be easier with Java classes.
What does indexing mean? The priority queue does not support indexing if it is no longer in the queue.
Java supports a standard priority queue such as C ++ STL. It can be found in the java.util namespace as PriorityQueue .
No, the standard Java library does not have such a data structure. I think most people use this: http://algs4.cs.princeton.edu/24pq/IndexMinPQ.java.html