Re: [JBoss-user] Removing items from a CMR collection

2003-09-10 Thread Matthew Hixson
on, it doesn't delete the bean. Al. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Hixson Sent: 10 September 2003 07:40 To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Removing items from a CMR collection Thanks, Scott. I got this work

RE: [JBoss-user] Removing items from a CMR collection

2003-09-10 Thread Alastair Rodgers
ehalf Of > Matthew Hixson > Sent: 10 September 2003 07:40 > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] Removing items from a CMR collection > > > Thanks, Scott. I got this working. > > public boolean emptyCart(CartLocal cart) { > Collection cartContentLi

Re: [JBoss-user] Removing items from a CMR collection

2003-09-09 Thread Matthew Hixson
Thanks, Scott. I got this working. public boolean emptyCart(CartLocal cart) { Collection cartContentList = cart.getCartContentList(); Iterator i = cartContentList.iterator(); while(i.hasNext()) { i.next(); // advance the pointer down the list i.remove(); } retu

Re: [JBoss-user] Removing items from a CMR collection

2003-09-09 Thread Scott M Stark
This is basic java.util.Collection behavior. From the java.util.Iterator.remove javadoc: public void remove() Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iter