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

Add equals(), hashCode(), and Comparable support to GString

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-2
    • 1.0-beta-3
    • None
    • None

    Description

      If GStrings implemented equals(), hashCode(), and compareTo(), we could better use them in maps and easily sort them in lists.

      Right now, this works:

      a = [ "${2}".toString(), "${3}".toString(), "${1}".toString() ]
      a.sort()

      But this doesn't:

      a = [ "${2}", "${3}", "${1}" ]
      a.sort()

      Attachments

        Activity

          People

            Unassigned Unassigned
            rodcope Rod Cope
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: