Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-668

Change ObjectUtils min() & max() functions to use varargs rather than just two parameters

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 3.0
    • Component/s: lang.*
    • Labels:
      None

      Description

      Currently ObjectUtils has min() and max() method with the following signatures:

      public static <T extends Comparable<? super T>> T min(T c1, T c2)
      public static <T extends Comparable<? super T>> T max(T c1, T c2)
      

      It would be useful to change these from taking just two parameters to any number using varags:

      public static <T extends Comparable<? super T>> T min(T... values)
      public static <T extends Comparable<? super T>> T max(T... values)
      

        Attachments

          Activity

            People

            • Assignee:
              niallp Niall Pemberton
              Reporter:
              niallp Niall Pemberton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: