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);
}
