On Fri, 24 Mar 2023 21:57:40 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:
>> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Clarify LHM and LHS specs regarding semantics of reverse-ordered views. >> - Remove special-cases for reversed LHM and LHS putAll and add. >> - Minor cleanups including formatting, naming, comments, modifiers. >> - Add @implSpec to default methods where it was missing. >> Add removeFirst/removeLast default methods to NavigableSet. >> Add throwing putFirst/putLast to TreeMap & ConcurrentSkipListMap >> Add throwing addFirst/addLast to TreeSet & ConcurrentSkipListSet >> Clarify access order specification for LinkedHashMap. > > src/java.base/share/classes/java/util/ReverseOrderDequeView.java line 103: > >> 101: } >> 102: >> 103: // copied from AbstractCollection > > Probably not the part of this PR, but it could be reasonable to create some > utility CollectionSupport class and create static methods (e.g. `static > boolean remove(Collection<?> c, Object o)`) with the implementations of > common collection algorithms, like this one. WDYT? Probably. I think I'll definitely need to do that with the spliterators, and likely also with other interating and bulk operations such as this one. But yes, not part of this PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r1170735013