RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]
XenoAmess
duke at openjdk.java.net
Thu May 26 17:42:17 UTC 2022
On Wed, 25 May 2022 05:07:12 GMT, Stuart Marks <smarks at openjdk.org> wrote:
>> XenoAmess has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add test for newHashSet and newLinkedHashSet
>
> src/java.base/share/classes/java/util/HashSet.java line 398:
>
>> 396: public static <E> HashSet<E> newHashSet(int numItems) {
>> 397: return new HashSet<>(HashMap.calculateHashMapCapacity(numItems));
>> 398: }
>
> Please use "elements" instead of "items" throughout the specifications for the objects that are members of the HashSet. This includes the API notes above as well as the specs and API notes in LinkedHashSet.
@stuart-marks done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8302
More information about the core-libs-dev
mailing list