-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
-
None
These would be available via a distinct API, e.g. something like Set.ofOrdered(...) or Map.ofOrdered(...) or some other name.
The idea is that iterating these collections would return the elements in a stable iteration order, namely the order in which the arguments are specified or the element order in the provided array.
This would match the behavior of Guava's ImmutableSet and ImmutableMap classes.
The idea is that iterating these collections would return the elements in a stable iteration order, namely the order in which the arguments are specified or the element order in the provided array.
This would match the behavior of Guava's ImmutableSet and ImmutableMap classes.
- csr for
-
JDK-8371177 Add unmodifiable set and map with defined encounter order
-
- Draft
-
- duplicates
-
JDK-8323729 Add .of() method for SequencedMap interface
-
- Closed
-
- relates to
-
JDK-8369651 'Map.of' methods should return SequencedMap
-
- Closed
-