On Wed, 29 Mar 2023 19:54:48 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:

>> In the same spirit, `reversed()` should also have a default implementation 
>> equivalent to
>> 
>>   
>> Collections.unmodifiableSequenceCollection(Arrays.asList(this.toArray())).reversed()
>
> @forax but this would not be a view: changes in the underlying collection 
> won't be reflected

Yes,
The spec says :"Changes to the underlying collection might or might not be 
visible in this reversed view, depending upon the implementation." so i believe 
the default implementation i proposed is a valid implementation

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

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

Reply via email to