Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177290 add copy factory methods for unmodifiable List, Set, Map
  3. JDK-8197976

Release Note: APIs for Creating Unmodifiable Collections

    XMLWordPrintable

    Details

      Description

      Several new APIs have been added that facilitate the creation of unmodifiable collections. The `List.copyOf`, `Set.copyOf`, and `Map.copyOf` methods create new collection instances from existing instances. New methods `toUnmodifiableList`, `toUnmodifiableSet`, and `toUnmodifiableMap` have been added to the `Collectors` class in the Stream package. These allow the elements of a Stream to be collected into an unmodifiable collection.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: