Reputation: 187
I was thinking something the likes of java.util.ArrayBlockingQueue
, which enables you to create size-limited queues. But that would have methods to retrieve and and add elements from both sides (head or tail).
Kind of like Perl arrays which have push
/pop
and shift
/unshift
methods.
I can probably roll my own but if something already exists out there I'd like to know.
Upvotes: 0
Views: 482