@ Override public void addListener ( IChemObjectListener col ) { List < IChemObjectListener > listeners = lazyChemObjectListeners ( ) ; if ( ! listeners . contains ( col ) ) { listeners . add ( col ) ; } // Should we throw an exception if col is already in here or // just silently ignore it? }
Use this to add yourself to this IChemObject as a listener . In order to do so you must implement the ChemObjectListener Interface .