模型
private HashMap<String, Object> data;
public Mode() {
this.data = new HashMap<String, Object>();
}
public Object get(Mode value) {
return this.data.get(value);
}
public void set(String key, Object value) {
this.data.put(key, value);
}
}
如何使用此模型设置和获取值?
答案 0 :(得分:-1)
试试这个
public Object get(String key) {
return this.data.get(key);
}
public void set(String key, Object value) {
this.data.put(key, value);
}