summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/util/IEvent1.java
blob: 9508d05007548dbf6fb6274000f72448df475b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package jrummikub.util;

/**
 * Interface for classes that can generate events having a single parameter
 * 
 * @param <T>
 *            type of the event parameter
 */
public interface IEvent1<T> {
	/**
	 * Start to publish all events to a given listener
	 * 
	 * @param listener
	 *            target listener
	 * @return a connection to remove the listener
	 */
	public Connection add(IListener1<T> listener);

	/**
	 * Stop publishing events to a given listener
	 * 
	 * @param listener
	 *            target listener
	 */
	public void remove(IListener1<T> listener);
}