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

remove PropertyValue from Object.allProperties() and eachProperty{}, refactor methods to use a Map

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0-JSR-4
    • None
    • None

    Description

      > Object.allProperties() and eachProperty

      {pv ->}

      > deal with PropertyValue objects that merely encapsulate a name/value
      > pair.
      > This is not very consistent with Maps and the general handling of
      > key/value pairs throughout the GDK.
      >
      > a) name/value in PV vs. key/value in Maps
      > b) eachProperty doesn't allow

      {key,value -> }

      like Maps do
      >
      > Is there a reason for calling it "all"Properties instead of "get" ?
      >
      > Can we let it return a Map instead of a list of PropertyValue objects?
      > We can even remove eachProperty and eachPropertyName then because
      > obj.properties.each{}
      > does the job.
      >
      > any opinions?

      Sounds like a wise and consistent change.
      You can go for it.


      Guillaume Laforge

      Attachments

        Activity

          People

            codevise Dierk König
            codevise Dierk König
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: