Please Support The Fight Against EU Software Patents
"Skill without imagination is craftsmanship and gives us many useful objects such as wickerwork picnic baskets. Imagination without skill gives us modern art." -- Tom Stoppard

Priority Queue

Nice and simple, this one. I needed a heap-based priority queue to use in my game, and for some reason there doesn't appear to be one in the Java libraries. I think this may be the first time I've been forced to code a classic algorithm instead of using Java's implementation...

It provides a simple priority queue for Objects, ranked using integers. It's designed to be used with times, and so the lowest priority Object is always removed first.

Source: priority.tgz

Package: org.davidmorgan.experimental