> I did not understand fully how the Bond's Atoms are retrieved... the
> says it returns an Object... but that's not very informative... moreover,
> CdkModelAdapter seems to return a CDK Atom there... which does not help me
> either... So, what does it return??
At some level, it can be whatever the client wants it to be ... let me
The AtomIterator calls getUniqueID() for each atom. This value is not
really used by the reading code. It is an Object that is to be used as a
The BondIterator calls getAtomUid1() and getAtomUid2(). The values
returned by these routines are the same as the UIDs previously returned
during the AtomIterator.
The idea behind this was to make it easy to write a client. The client can
return whatever it wants. That is why the CdkModelAdapter was returning a
On the other side, this is a very good use of a hash table. As you iterate
through the Atoms you use a hash table to map the client's atom UIDs to
your own data structures. Then, when you iterate through the bonds, you
look up in the hash table to get your two atom data structures.
When you are all done, free the hash table.