[ https://issues.apache.org/jira/browse/LANG-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904045#action_12904045 ]
Henri Yandell commented on LANG-642: ------------------------------------ The issue is that you can't use varargs for these method signatures rather than concerns over optimization or code duplication. The Java SDK covers max(int, int); this is a request, per the varargs issue, to support max(int, int, int, int). I wonder if one option would be to implement max(int[]), and then have an IntegerUtils facade to handle the varargs. Not sure if that would work or not. > Need varargs form of NumberUtils.max(), etc > ------------------------------------------- > > Key: LANG-642 > URL: https://issues.apache.org/jira/browse/LANG-642 > Project: Commons Lang > Issue Type: Improvement > Components: lang.math.* > Reporter: david cogen > Priority: Minor > > There should be a varargs form of the NumberUtils.max() and min() functions. > E.g. int max (int... numbers) > This might conflict with the existing int max (int[] numbers) but that > function would in fact not be needed if the varargs form existed because an > array could be supplied to it just as easily. > Or, if it is undesirable to remove max(int[] numbers), then a varargs > function could be defined as > int max (int number1, int... moreNumbers) > which would work for any number of arguments greater than 0. > Of course this function should be implemented for all number types (byte, > short, float, double, etc) and both max() and min() should be provided. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.