// Path: config-toolkit/src/main/java/com/dangdang/config/service/observer/IObserver.java
// public interface IObserver {
// 
// 	/**
// 	 * 通知
// 	 * 
// 	 * @param data
// 	 */
// 	void notified(String data, String value);
// 
// }


import com.dangdang.config.service.observer.IObserver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
                this.put(entry.getKey(), entry.getValue());
            }

        } else {
            LOGGER.debug("Config group has none keys, clear.");
            super.clear();
        }
    }

    @Override
    public final String put(String key, String value) {
        if (value != null) {
            value = value.trim();
        }
        String preValue = super.get(key);
        if (value != null && !value.equals(preValue)) {
            LOGGER.debug("Key " + key + " change from {} to {}", preValue, value);
            super.put(key, value);

            // If value change, notify
            if (preValue != null) {
                notify(key, value);
            }
        }
        return preValue;
    }

    /**
     * 观察者列表
     */
// Path: config-toolkit/src/main/java/com/dangdang/config/service/observer/IObserver.java
// public interface IObserver {
// 
// 	/**
// 	 * 通知
// 	 * 
// 	 * @param data
// 	 */
// 	void notified(String data, String value);
// 
// }


// Path: config-toolkit/src/main/java/com/dangdang/config/service/GeneralConfigGroup.java
import com.dangdang.config.service.observer.IObserver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

                this.put(entry.getKey(), entry.getValue());
            }

        } else {
            LOGGER.debug("Config group has none keys, clear.");
            super.clear();
        }
    }

    @Override
    public final String put(String key, String value) {
        if (value != null) {
            value = value.trim();
        }
        String preValue = super.get(key);
        if (value != null && !value.equals(preValue)) {
            LOGGER.debug("Key " + key + " change from {} to {}", preValue, value);
            super.put(key, value);

            // If value change, notify
            if (preValue != null) {
                notify(key, value);
            }
        }
        return preValue;
    }

    /**
     * 观察者列表
     */
    private final List<IObserver> watchers = new ArrayList<>();