You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2011/01/07 01:12:46 UTC

[jira] Updated: (LANG-668) Change ObjectUtils min() & max() functions to use varargs rather than just two parameters

     [ https://issues.apache.org/jira/browse/LANG-668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated LANG-668:
---------------------------------

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

{code}
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)
{code}

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

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


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

{code}
    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)
{code}

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

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



> Change ObjectUtils min() & max() functions to use varargs rather than just two parameters
> -----------------------------------------------------------------------------------------
>
>                 Key: LANG-668
>                 URL: https://issues.apache.org/jira/browse/LANG-668
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 2.5
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 3.0
>
>
> Currently ObjectUtils has min() and max() method with the following signatures:
> {code}
> 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)
> {code}
> It would be useful to change these from taking just two parameters to any number using varags:
> {code}
> public static <T extends Comparable<? super T>> T min(T... values)
> public static <T extends Comparable<? super T>> T max(T... values)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.