RFR: 8311517: ArrayList javadoc improvements related to sequenced collection updates

dan1st duke at openjdk.org
Wed Jul 26 11:08:58 UTC 2023


The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add addFirst(), removeFirst() and reversed() methods to lists.
However, the Javadoc of List mentions:
 > The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.

This PR updates that Javadoc to factor in the new methods introduced by JEP 431.

https://bugs.openjdk.org/browse/JDK-8311517
https://mail.openjdk.org/pipermail/core-libs-dev/2023-June/107328.html
https://mail.openjdk.org/pipermail/core-libs-dev/2023-July/109637.html

This PR only affects documentation.

-------------

Commit messages:
 - 8311517: ArrayList javadoc improvements related to sequenced collection updates

Changes: https://git.openjdk.org/jdk/pull/15040/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15040&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8311517
  Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/15040.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15040/head:pull/15040

PR: https://git.openjdk.org/jdk/pull/15040


More information about the core-libs-dev mailing list