[External] : Re: New candidate JEP: 431: Sequenced Collections

Remi Forax forax at univ-mlv.fr
Wed Nov 2 18:37:20 UTC 2022


----- Original Message -----
> From: "Remi Forax" <forax at univ-mlv.fr>
> To: "Stuart Marks" <stuart.marks at oracle.com>
> Cc: "core-libs-dev" <core-libs-dev at openjdk.org>
> Sent: Wednesday, November 2, 2022 7:27:02 PM
> Subject: Re: [External] : Re: New candidate JEP: 431: Sequenced Collections

There is also the issue with equals/hashCode.

You can test the equality of two lists using List.equals(), you can test the equality of two sets using Set.equals(), but you can not compare two SequencedCollection using equals.

A SequencedCollection basically occupy the same lattice as Collection and do not provide enough guarantee to be different than Collection.

Rémi


More information about the core-libs-dev mailing list