*/
package org.opendaylight.controller.md.sal.common.impl;
+import static com.google.common.base.Preconditions.checkNotNull;
+
import java.util.Collections;
import java.util.EventListener;
import java.util.HashSet;
import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import static com.google.common.base.Preconditions.*;
import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
return unmodifiableView;
}
-
+
public ListenerRegistration<T> register(T listener) {
checkNotNull(listener, "Listener should not be null.");
ListenerRegistrationImpl<T> ret = new ListenerRegistrationImpl<T>(listener);
listeners.add(ret);
return ret;
}
-
-
+
+
@SuppressWarnings("rawtypes")
private void remove(ListenerRegistrationImpl registration) {
listeners.remove(registration);