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

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5
    • 3.0
    • lang.*
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: