RFR: 8311517: Add performance information to ArrayList javadoc [v2]

Brian Burkhalter bpb at openjdk.org
Fri Aug 4 16:02:33 UTC 2023


On Fri, 4 Aug 2023 15:36:05 GMT, dan1st <duke at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/ArrayList.java line 46:
>> 
>>> 44:  * {@code listIterator}, and {@code reversed} operations run in constant time.
>>> 45:  * The {@code add}, and {@code addLast} operations runs in <i>amortized
>>> 46:  * constant time</i>, that is, adding n elements requires O(n) time.  All of
>> 
>> Should `n` and `O(n)` here be in italics or code font?
>
> It wasn't in italic or code font before so I didn't change that. However, I am open to changing that.

Fine to leave it as is in that case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15040#discussion_r1284596785


More information about the core-libs-dev mailing list