The simplest way to implement a priority queue data type is to keep an associative array mapping each priority to a list of elements with that priority. ...
java-tips.org