eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

FIFO/Queue list

Open pdvrieze opened this issue 7 years ago • 3 comments

Looking at the available containers it is missing an efficient list that provides a (resizable) fifo queue that is optimized to allow for removing the front element from the list. This is reasonably easy to implement by maintaining an initial index for the starting offset and allowing index wraparound. This should probably be a separate class from FastList as it does require an additional calculation to determine array index. It only makes sense for a mutable container.

pdvrieze avatar Aug 03 '18 13:08 pdvrieze

hey @pdvrieze, @motlin I would like to help with this issue. I just need some clue to understand the context, you need a list that act like a fifo queue, but optimized, right? (sorry about my english)

youngkaneda avatar Dec 31 '18 15:12 youngkaneda

Eclipse Collections has the interfaces StackIterable, MutableStack, ImmutableStack. I'd imagine adding QueueIterable, MutableQueue, ImmutableQueue. Rather than pop() and push(), I think we'd have methods like offer()/poll(), add()/remove(). I'd prefer names like enqueue()/dequeue() but it would probably be best to stick with the same method names as https://docs.oracle.com/javase/7/docs/api/java/util/Queue.html

On Mon, Dec 31, 2018 at 10:19 AM Juan Pablo [email protected] wrote:

hey @pdvrieze https://github.com/pdvrieze I would like to help with this issue. I just need some clue to understand the context, you need a list that act like a fifo queue, but optimized, right? (sorry about my english)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/eclipse-collections/issues/592#issuecomment-450657313, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO6IlZ6RapI_PdWidxtY0D5lSULr7iEks5u-isDgaJpZM4VuArC .

motlin avatar Jan 01 '19 00:01 motlin

ok, i get it, thx dude, i will try to do my best

youngkaneda avatar Jan 01 '19 15:01 youngkaneda