package jrummikub.util; import java.util.HashSet; public class Event implements IEvent { private HashSet listeners = new HashSet(); @Override public void add(IListener listener) { listeners.add(listener); } @Override public void remove(IListener listener) { listeners.remove(listener); } public void fire() { for (IListener listener : listeners) { listener.fire(); } } }