package com.prolog.eis.utils;

import com.prolog.framework.core.restriction.FieldUtils;
import com.prolog.framework.core.restriction.GetterFunction;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhanghan
 */
public class MapToolKit {

    private final Map<String, Object> map = new HashMap<>();

    public <T, R> MapToolKit put(GetterFunction<T, R> func, Object value) {
        this.map.put(FieldUtils.getName(func), value);
        return this;
    }

    public Map<String, Object> getMap() {
        return this.map;
    }

}