Hi Andreas,
On Thursday 05 October 2006 13:54, Andreas Schüller wrote:
> when I recently started the conversion of some program code using CDK to
> accommodate to the recent interface changes I noticed that it is no
> longer possible to use Java 1.5 for-each loops to iterate over atoms in
> an AtomContainer.
>
> When earlier I did
>
> for (IAtom atom: atomContainer.getAtoms()) {
> // some code
> }
>
> I now have to do
>
> Iterator iterator = atomContainer.atoms();
> while (iterator.hasNext()) {
> IAtom atom = (IAtom) iterator.next();
> // some code
> }
Rob Schellhorn posted this to the devel list too, this week. It's an unlucky
and unanticipated side effect of the recent API cleanup.
> I love to use the for-each loops of Java 1.5 since they are so handy,
> safe some typing and produce more readable code.
> Is there anyway I could use for-each loops with the new interfaces?
This is being discussed now on the developer lists, and I welcome you to
subscribe and reply on the issue.
Egon
--
[EMAIL PROTECTED]
Cologne University Bioinformatics Center (CUBIC)
Blog: http://chem-bla-ics.blogspot.com/
GPG: 1024D/D6336BA6
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user