compare numbers of different Number classes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P5
    • None
    • Affects Version/s: 7
    • Component/s: core-libs
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      Instances of Number subclasses (such as Byte, Short, Integer, Long, Float, Double, BigInteger, BigDecimal) are comparable with instances of the same class, but are not comparable with instances of the other Number subclasses. So this RFE is about new class, say, java.util.NumberComparator, which extends java.util.Comparator<Number> and is able to compare instances of different Number subclasses. The comparison has to be precise (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6582946)


      JUSTIFICATION :
      NumberComparator could be useful in cases when instances of different Number subclasses is used or expected at the same time. For example, look at class javax.swing.RowFilter.NumberFilter

            Assignee:
            Joe Darcy
            Reporter:
            Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: