Proposal: Add new methods get(int) and set(int, E) to ArrayDeque
Archie Cobbs
archie.cobbs at gmail.com
Tue May 13 19:20:34 UTC 2025
On Mon, May 12, 2025 at 12:00 PM Archie Cobbs <archie.cobbs at gmail.com>
wrote:
> I would like to offer to do the following:
>
> - Change the title of this bug from "retrofit ArrayDeque to implement
> List" to "Add indexed get() and set() methods to ArrayDeque"
>
>
> - Propose a corresponding PR and CSR to add get(int) and set(int, E)
> methods to ArrayDeque
>
> But first I want to check with this list first to see if there are any
> objections?
>
After some discussion it seems the more complete solution might be better,
that is, giving ArrayDeque a true List view rather than just adding get()
and set(). Since ArrayDeque's current hashCode()/equals() is not compatible
with List, this would take the form of an asList() method, etc.
Any thoughts appreciated. In the meantime I'll explore what that might look
like.
Thanks,
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250513/80791091/attachment.htm>
More information about the core-libs-dev
mailing list