RFR: 8266571: Sequenced Collections [v4]
    Rémi Forax 
    forax at openjdk.org
       
    Wed Mar 29 20:08:31 UTC 2023
    
    
  
On Wed, 29 Mar 2023 19:54:48 GMT, Tagir F. Valeev <tvaleev at 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
    
    
More information about the client-libs-dev
mailing list