package de.invation.code.toval.event;

import java.io.Serializable;
import java.util.HashSet;

import de.invation.code.toval.validate.Validate;

public abstract class AbstractListenerSupport<L extends Object> implements Serializable {

	protected HashSet<L> listeners = new HashSet<L>();
	
	public void addListener(L l) {
		Validate.notNull(l);
		listeners.add(l);
	}
	
	public void removeListener(L l) {
		Validate.notNull(l);
		listeners.remove(l);
	}

}

@@ -229,16 +229,87 @@
 able %7B%0A%0A
+%09private static final long serialVersionUID = -7522608459092207941L;%0A%09%0A
 %09protect
@@ -362,20 +362,23 @@
 %09public 
-void
+boolean
  addList
@@ -406,32 +406,39 @@
 e.notNull(l);%0A%09%09
+return 
 listeners.add(l)
@@ -456,12 +456,15 @@
 lic 
-void
+boolean
  rem
@@ -507,16 +507,23 @@
 l(l);%0A%09%09
+return 
 listener

return value for adding listeners in AbstractListenerSupport