package ink.wgink.common.pojo;

import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName: Env
 * @Description: 环境变量
 * @Author: wanggeng
 * @Date: 2022/5/16 14:46
 * @Version: 1.0
 */
public class Env implements Map<String, String> {

    Map<String, String> envMap = new ConcurrentHashMap<>();

    @Override
    public int size() {
        return envMap.size();
    }

    @Override
    public boolean isEmpty() {
        return envMap.isEmpty();
    }

    @Override
    public boolean containsKey(Object key) {
        return envMap.containsKey(key);
    }

    @Override
    public boolean containsValue(Object value) {
        return envMap.containsValue(value);
    }

    @Override
    public String get(Object key) {
        return envMap.get(key);
    }

    @Override
    public String put(String key, String value) {
        return envMap.put(key, value);
    }

    @Override
    public String remove(Object key) {
        return envMap.remove(key);
    }

    @Override
    public void putAll(Map<? extends String, ? extends String> m) {
        envMap.putAll(m);
    }

    @Override
    public void clear() {
        envMap.clear();
    }

    @Override
    public Set<String> keySet() {
        return envMap.keySet();
    }

    @Override
    public Collection<String> values() {
        return envMap.values();
    }

    @Override
    public Set<Entry<String, String>> entrySet() {
        return envMap.entrySet();
    }

    @Override
    public String toString() {
        return envMap.toString();
    }
}
