commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ash .." <>
Subject [lang] ArrayUtils.subarray() array types
Date Sun, 30 Nov 2003 20:18:23 GMT

>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.

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);


Express yourself with cool emoticons - download MSN Messenger today!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message