@ Override public void addAtom ( IAtom oAtom , IMonomer oMonomer ) { if ( ! contains ( oAtom ) ) { super . addAtom ( oAtom ) ; if ( oMonomer != null ) { // Not sure what's better here...throw nullpointer exception? oMonomer . addAtom ( oAtom ) ; if ( ! monomers . containsKey ( oMonomer . getMonomerName ( ) ) ) { monomers . put ( oMonomer . getMonomerName ( ) , oMonomer ) ; } } } /* * notifyChanged() is called by addAtom in AtomContainer */ }
Adds the atom oAtom to a specified Monomer .