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

add Collectors for collecting into unmodifiable List, Set, and Map

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:

      Description

      Add Collector implementations that collect into the unmodifiable List, Set, and Map implementations that are currently returned by List.of(), Set.of(), and Map.of().

      On Collectors:

      toUnmodifiableList()
      toUnmodifiableSet()
      toUnmodifiableMap(keyFunc, valueFunc)
      toUnmodifiableMap(keyFunc, valueFunc, mergeFunc)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                smarks Stuart Marks
                Reporter:
                smarks Stuart Marks
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: