The non-deterministic iteration order of Immutable Collections
Stuart Marks
stuart.marks at oracle.com
Sat Mar 25 00:17:44 UTC 2023
On 3/24/23 10:53 AM, Kasper Nielsen wrote:
> Would
> java.util.SequencedMap.of(...)
> java.util.SequencedMap.copyOf(SequencedMap map)
> java.util.SequencedSet.of(...)
> java.util.SequencedSet.copyOf(SequencedSet set)
> solve your problem?
>
> I would love to see them included in JEP 431.
> Should be fairly simply to implement just have a side
> array that maintains the elements in order.
These are fine ideas, but they won't be part of JEP 431. They might be reasonable as
a future enhancement, though.
s'marks
More information about the core-libs-dev
mailing list