void captureCharacterDataFromObservedStates() { if (observedStates == null) { if (data != null) data.removeListener(this); data = null; } else { CharacterData temp = observedStates.getParentData(); if (temp != data) { if (data != null) data.removeListener(this); if (temp != null) temp.addListenerHighPriority(this); data = temp; } } }
/** endJob is called as a module is quitting; modules should put their clean up code here. */ public void endJob() { if (data != null) data.removeListener(this); }