All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uncle.demain.View Maven / Gradle / Ivy

package uncle.demain;

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

/**
 * Created by hujianbo on 2018/1/18.
 */
public class View {
    /**
     * 视图路径
     */
    private String path;
    /**
     * 模型数据
     */
    private Map model;

    /**
     * 构造函数
     *
     * @param path
     */
    public View(String path) {
        this.path = path;
        model = new HashMap();
    }

    /**
     * 根据key和value 生成View
     *
     * @param key
     * @param value
     * @return View
     */
    public View addModel(String key, Object value) {
        model.put(key, value);
        return this;
    }

    /**
     * 获取路径
     *
     * @return
     */
    public String getPath() {
        return path;
    }

    /**
     * 获取model
     *
     * @return Map
     */
    public Map getModel() {
        return model;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy