class SwiftEventDispatcher {

    public static void remove(SwiftEventListener<?> listener) {
        if (listener == null) {
            return;
        }

        synchronized (EVENTS) {
            for (List<SwiftEventListener> listeners : EVENTS.values()) {
                Iterator<SwiftEventListener> itr = listeners.iterator();
                while (itr.hasNext()) {
                    if (itr.next() == listener) {
                        itr.remove();
                    }
                }
            }
        }
    }

}