@SuppressWarnings("unchecked")
    protected <T> void fireOptionChanged(Option<T> option, T oldValue, T newValue) {
        if (!Objects.equals(oldValue, newValue)) {
            OptionChangeEvent<T> e = new OptionChangeEvent<>(
                    this, option, oldValue, newValue);

            if (!globalListeners.isEmpty()) {
                for (OptionChangeListener<Object> listener : globalListeners) {
                    listener.optionChanged(e);
                }
            }

            List<OptionChangeListener<?>> specificListeners = specificListenerMap.get(option);
            if (specificListeners != null) {
                for (OptionChangeListener<?> listener : specificListeners) {
                    ((OptionChangeListener<? super T>) listener).optionChanged(e);
                }
            }
        }
    }