[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [lang] ArrayUtils.subarray() array types
From:       "Ash .." <equinus100 () hotmail ! com>
Date:       2003-11-30 20:18:23
[Download RAW message or body]



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic