}
/**
- * Stops listening changes.
+ * Stops listening changes. Returns true, if the listener was listening something.
*/
- public void stopListening() {
+ public boolean stopListening() {
synchronized(observables) {
+ if(observables.isEmpty())
+ return false;
for(Observable observable : observables)
observable.removeListener(this);
observables.clear();
+ return true;
}
}
}