public synchronized void add(BaseObject obj) { synchronized (objList) { if (objList.contains(obj)) { return; } obj.addListener(this); objList.add(obj); obj.notifyListeners(obj); notifyListener(obj); } }