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

java.util.Arrays does not have min(T[]), max(T[]) methods.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      It is inconsistent for Java to support taking the extrema of an arbitrary collection through Collections.min(...) and Collections.max(...) but not of an arbitrary array. Particularly, primitive arrays (which cannot be wrapped through Arrays.asList(T[])) require each application to supply its own minimum and maximum loop.

      JUSTIFICATION :
       - Duplicate code throughout many applications is a waste of developer time.
       - Inconsistency between the treatment of arrays and collections is a very visible "wart" on the Java platform.

            smarks Stuart Marks
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: