You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by EP...@upstate.com on 2003/08/06 14:02:57 UTC
[beanutils] Possible to treat a Set as a List in PropertyUtils?
Hi all,
I want to use the PropertyUtilsBean like this:reactions[0].kinase.name,
however getReactions() returns a set, versus a list. I don't really care
which element I get from the set.. Is it a terrible idea to be able to pick
the first/nth/ element from a set by converting it to an array?
Eric Pugh
Re: [beanutils] Possible to treat a Set as a List in PropertyUtils?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Wednesday, August 6, 2003, at 01:02 PM, EPugh@upstate.com wrote:
> Hi all,
>
> I want to use the PropertyUtilsBean like this:reactions[0].kinase.name,
> however getReactions() returns a set, versus a list. I don't really care
> which element I get from the set.. Is it a terrible idea to be able to
> pick
> the first/nth/ element from a set by converting it to an array?
i don't have any particular objections. i don't think that this extra
piece of functionality would have any particular impact on backwards
compatibility. maybe it'd be an idea to allow beanutils to count through
any collection.
can anyone see anything i've missed?
i'm not sure whether it'd be better/faster to iterate through rather than
create a new list each time. opinions, anyone?
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [beanutils] Possible to treat a Set as a List in PropertyUtils?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Wednesday, August 6, 2003, at 01:02 PM, EPugh@upstate.com wrote:
> Hi all,
>
> I want to use the PropertyUtilsBean like this:reactions[0].kinase.name,
> however getReactions() returns a set, versus a list. I don't really care
> which element I get from the set.. Is it a terrible idea to be able to
> pick
> the first/nth/ element from a set by converting it to an array?
i don't have any particular objections. i don't think that this extra
piece of functionality would have any particular impact on backwards
compatibility. maybe it'd be an idea to allow beanutils to count through
any collection.
can anyone see anything i've missed?
i'm not sure whether it'd be better/faster to iterate through rather than
create a new list each time. opinions, anyone?
- robert