Re: [OT] [JAVA] Iterate a collection and modify

2007-04-11 Thread Laurie Harper
First, this list is for Struts issues, not a general Java programming help. That said, here's a quick response: Modifying an Iterator while iterating it is not guaranteed to work. It depends on the specific Iterator implementation. This is clearly documented in the Javadoc for the Collections

[JAVA] Iterate a collection and modify

2007-04-10 Thread temp temp
How can I iterate a collection and modify at the same time ? Example public static Collection getAncestors( Entity aEntity, Object aContext ){ Collection vAncestors=new ArrayList(); IDocument vDocument= findDocumentByName( aEntity.getSuper(), aCon