Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Why doesn't ArrayDeque implement the List interface?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mark Space, post: 3810501"] It actually doesn't say that. It says "faster than Stack" ... Stack is synchronized. It says "faster than LinkedList when used as a Queue" ... Queues are inserted at the end and removed from the head. That's not inserting and deleting at either end. The latter makes me wonder if ArrayDeques are implemented as circular buffers. This might mean that the "offset" which get() would use is likely to shift around. That offset also might change completely if the underlying array fills up and has to be copied to a larger array. (ArrayDeques are specified to grow as needed, they don't block or throw errors related to being out of storage.) I think if you try implementing your own you'll find out exactly what the issue is. I'll bet it's nasty too. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Why doesn't ArrayDeque implement the List interface?
Top