Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7237

Implement an alternative asImmutable which guards the elements of a collection as well

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • groovy-jdk
    • None

    Description

      The current implementation of asImmutable returns a simple Collections.unmodifiable.... This only guarantees that no element is added or removed. Nevertheless an element itself can be modified. What do you think about a feature enhancement of asImmutable where you can guard the elements of a collection as well? S.th. like asDeepImmutable could proxy the collection and guards all setter of all elements.

      What do you think about it?

      Regards, Leif

      Attachments

        Activity

          People

            Unassigned Unassigned
            strug Leif Hanack
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: