I am looking for a data structure that behaves like a queue (it could be a queue implementation) but allows me to get multiple elements from the collection (example: the first 15 elements of the queue).
It would be very nice if it doesn't require new dependencies.
Is there anything like that?
The closer I got during my research was the BlockingQueue with the drainTo() method, but this is not what I need.