[ 
https://issues.apache.org/jira/browse/LANG-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17756082#comment-17756082
 ] 

Gary D. Gregory commented on LANG-1707:
---------------------------------------

| If not "for sure", why discuss implementation details?

Because common sense: You specified the implementation in the ticket 
description. If don't want a critique of the implementation, then don't specify 
it.

> Syntactic sugar to concatenate arrays
> -------------------------------------
>
>                 Key: LANG-1707
>                 URL: https://issues.apache.org/jira/browse/LANG-1707
>             Project: Commons Lang
>          Issue Type: Wish
>          Components: lang.*
>    Affects Versions: 3.13.0
>            Reporter: Gilles Sadowski
>            Priority: Trivial
>              Labels: suggestion
>             Fix For: 3.14.0
>
>
> In {{ArrayUtils}}, a method such as {{addAll(T[], T ... others)}} makes it 
> easy to concatenate two arrays.
> Then, one can concatenate several arrays:
> {code}
>     /** 
>      * @param <T> Type. 
>      * @param arrays Arrays. 
>      * @return an array that contains all the elements in the input arrays. 
>      */
>     private static <T> T[] concat(T[] ... arrays) {
>         final int numArr = arrays.length;
>         T[] concatenated = null;
>         for (int i = numArr; i > 0; i--) {
>             concatenated = ArrayUtils.addAll(arrays[i - 1], concatenated);
>         }
>         return concatenated;
>     }
> {code}
> Shouldn't {{concat(T[] ...)}} be part of {{ArrayUtils}}?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to