Hello everybody,
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
}
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?
Cheers,
Andreas
--
PhD student in the research group of Prof. Dr. Gisbert Schneider
Institute for Organic Chemistry and Chemical Biology
Chair for Chemo- and Bioinformatics
Beilstein-endowed Chair for Chemoinformatics
Johann Wolfgang Goethe University
Siesmayerstr. 70
60323 Frankfurt am Main
Germany
Tel.: +49-69-798-24879
Fax: +49-69-798-24880
http://www.modlab.de/
-------------------------------------------------------------------------
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