You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ash .." <eq...@hotmail.com> on 2003/11/30 21:18:23 UTC

[lang] ArrayUtils.subarray() array types


>
>One point I spotted is that the returned array is always an Object[], no
>matter what the input array type is. This is different to toArray(Object[])
>on a List. I'm not sure that its right either.
>
>Stephen
>

Do you suggest we implement checking the type of the input array and 
creating the subarray with the same type, using reflection, like I see, for 
example in java.util.ArrayList.toArray(Object[]) ?


Also, I think we can provide implementations for all the primitive types and 
String. I would be willing to implement equivalent methods for all these 
types right away.

public static int[] ArrayUtils.subarray(int[] array, int 
startIndexInclusive, int endIndexExclusive);
etc...


Ash

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! 
http://www.msn.co.uk/messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org