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

Add static methods Integer.compare() and Long.compare()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • 6
    • 1.4.2
    • core-libs

      Name: jl125535 Date: 03/19/2004


      A DESCRIPTION OF THE REQUEST :
      Both Double and Float have a convenient static compare() method so that, e.g.,

        Double.compare (d1, d2) == new Double (d1).compareTo (d2)

      But Integer and Long do not have such a method. I think it would be convenient
      of those were added.

      JUSTIFICATION :
      It would make writing new implementations of Comparable more convenient, and there's no reason for the inconsistency between Double and Integer.
      (Incident Review ID: 237828)
      ======================================================================
      ###@###.### 10/28/04 01:20 GMT

            darcy Joe Darcy
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: