commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ash .." <equinus...@hotmail.com>
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.
>
>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


Mime
View raw message