commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <flame...@gmail.com>
Subject Re: [collections] New methods
Date Mon, 03 Jul 2006 16:12:35 GMT
On 7/3/06, Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> Some possible new methods for [collections]
>
> ListUtils.trimSize(List list, int size)
> - trims list size to size if too large
>
> ListUtils.forceSize(List list, int size)
> - trims list size to size if too large
> - adds extra nulls to the list if its too small

Would it be bad to just have the one method that both enlarged and
shrunk?  resize(LIst, int) or something?

> ListUtils.copy(List,Object[])
> - copy a collection into an array

java.util.Collection.toArray() ?

> ListUtils.merge(List list, List defaultValues)
> - replace any null values in list with the matching index in defaultValues

Do you think this is something people will need often? Seems likely to
be quite rare.

Hen

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