X-Git-Url: https://git.pterodactylus.net/?p=jSite2.git;a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Fevent%2FListenerSupport.java;h=a339d270b30a6f88b7ee7596f63bab2b84cdca77;hp=1b11296dab298f206df13b32faee550af825bdd1;hb=f79ff58f9d4adc684cb9c54d975636f5cb35db2f;hpb=bb6feabe48f90740d500d3f4673dbd9309fe0b11 diff --git a/src/net/pterodactylus/util/event/ListenerSupport.java b/src/net/pterodactylus/util/event/ListenerSupport.java index 1b11296..a339d27 100644 --- a/src/net/pterodactylus/util/event/ListenerSupport.java +++ b/src/net/pterodactylus/util/event/ListenerSupport.java @@ -20,36 +20,22 @@ package net.pterodactylus.util.event; import java.util.ArrayList; +import java.util.EventListener; import java.util.List; /** - * Helper class to ease listener management. + * Helper class for {@link EventListener} management. * - * @param - * The type of the source * @param - * The type of the listeners - * @author David ‘Bombe’ Roden <bombe@freenetproject.org> + * The type of the event listener + * @author David Roden <droden@gmail.com> */ -public class ListenerSupport { - - /** The source of the events. */ - private final S source; +public class ListenerSupport { /** The list of registered listeners. */ private final List listeners = new ArrayList(); /** - * Creates a new listener support. - * - * @param source - * The source of all events - */ - public ListenerSupport(S source) { - this.source = source; - } - - /** * Adds a listener to the list of registered listeners. * * @param listener @@ -73,23 +59,11 @@ public class ListenerSupport { } } - // - // PROTECTED METHODS - // - - /** - * Returns the source of all events. - * - * @return The source of all events - */ - protected S getSource() { - return source; - } - /** * Returns a list of all listeners. This list is a copy of the internally * kept list and as thus will not be modified by calls to - * {@link #addListener(Object)} or {@link #removeListener(Object)}. + * {@link #addListener(EventListener)} or + * {@link #removeListener(EventListener)}. * * @return The list of all listeners */ @@ -99,4 +73,6 @@ public class ListenerSupport { } } + /* TODO */ + }