Let's stay sane here...

Basicly it comes down to this Timo, you must use other classes to access individual items in the Bag. You can access via the toArray or uniqueSet. If it's a MapBag, then you'd use getMap, and from there you can use get(). In a sense Bag indirectly does have a get method.

Paul

James Carman wrote:
Why don't you write Sun and ask them to add a get() method to the
java.util.Set interface too?

-----Original Message-----
From: Nentwig, Timo [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 4:10 PM
To: Jakarta Commons Users List
Subject: Re: [collections] Re: Why doesn't Bag have a get() method?

Stephen Colebourne wrote:
Get what? What method signature are you expecting? What is your use case?

Well, get what I did add(). Get that what contains() is checking for. Get
what getCount() is counting.

----- Original Message ----
From: Timo Nentwig <[EMAIL PROTECTED]>
To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
Sent: Thursday, 13 July, 2006 2:39:59 PM
Subject: Why doesn't Bag have a get() method?

Hi!

Well, see subject: why doesn't Bag have a get() method? Doesn't make
sense, does it?
Timo





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to