I have a number of queues and priority queues in my application. I would like to easily access the nth items in these queues, but don't see an easy way to do that using the API.
I guess I could create an Iterator and iterate to the nth element or use toArray()[index], but it seems like there should be an easier way.
Am I missing something?
Queueinterface doesn't expose direct element access to its elements, only to the front, and access via iterators. For your use you probably want aList-based collection.