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

ObjectName should implement Comparable<ObjectName>

XMLWordPrintable

    • b31
    • generic
    • generic

      javax.management.ObjectName should implement Comparable<ObjectName>. Even though it is not very meaningful to say that one ObjectName is "less than" another, by implementing Comparable we would allow a SortedSet<ObjectName> to show its contents in a reasonable order without having to define a custom Comparator. In particular, ObjectNames with the same domain should be grouped together.

      The proposed semantics would be that name1.compareTo(name2) would be the same as name1.getCanonicalName().compareTo(name2.getCanonicalName()).

            lmalvent Luis-Miguel Alventosa (Inactive)
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: