> > I don't (yet) want to be prescriptive in any potential solution. And I > know that this has been discussed before. I mostly just want to start a > conversation and see how much traction it gets. > 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. /Kasper