RFR: 8266571: Sequenced Collections

Viktor Klang duke at openjdk.org
Mon Mar 20 23:45:08 UTC 2023


On Tue, 4 Oct 2022 14:43:44 GMT, Viktor Klang <duke at openjdk.org> wrote:

>> PR for Sequenced Collections implementation.
>
> src/java.base/share/classes/java/util/SequencedCollection.java line 93:
> 
>> 91:      * underlying collection. Changes to the underlying collection might or might not be visible
>> 92:      * in this reversed view, depending upon the implementation.
>> 93:      *
> 
> @stuart-marks Perhaps an opportunity to spec it so that x == x.reversed().reversed() (i.e. unwrap on double-reverse)?

@stuart-marks What are examples of cases where it wouldn't be reasonable: https://github.com/openjdk/jdk/pull/7387/files#diff-2b261a88d9ed30893d24186a36ef500d284d82e8f345591fc6c44ed5ae15da4fR161 ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r988048079


More information about the core-libs-dev mailing list