No, you're not. Actually, I had the same problem recently, but fortunately it was a queue of objects so I used java.util's. When I wrote the PriorityQueue interface I really did not think that it could have been useful.
The long-term plan is to integrate the java.util PriorityQueue interface with its funny names. At that point there will be an iterator() method that you can iterate on to get the elements in the queue without dequeueing.
In the meantime, you can subclass ShortHeapPriorityQueue and add a method that returns a copy of the heap or the heap itself, depending on your efficiency constraints. Something like
public class MyQueue extends ShortHeapPriorityQueue {
public short[] elements() {
return java.util.Arrays.copyOfRange( heap, 0, size );
}
}
Ciao,
seba