On Jan 18, 2008, at 8:42 AM, Egon Willighagen wrote:
Hmm. Well I think going the IElement route is a good idea. So
IAtom.getSymbol() would access the symbol via the IElement field (for
normal atoms). How would it work for pseudo atoms?
And IAtom.getAtomicNumber() would do it via the IElement as well? ANd
a pseudo atom could just return 0
This is the current behavior, I think...
I guess you mean that we add a stub in the new IAtom with an
IElement as field?
OK, so I finally looked at the sources (as I should have done in the
If IAtom is a child of IElement, why should it have a field for an
Also, I'm wondering whether there is any need for the getLabel/
setLabel methods in IPseudoAtom?
Wouldn't it be better to remove them, so that the ysmbol is accessed
by getSymbol() just like for any other atom? But getAtomicNumber
would be overridden to return a hard coded 0? The advantage is that
one does not need to inspect the class via instanceof to detect a
pseudo atom (though one could do it if required). Instead one can
simply check te aotmic number. Of course this assumes, that for all
real atoms, the atomic number is set properly