Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8156081

add unmodifiable set and map with defined encounter order

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • 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.

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: