package com.vci.starter.web.pagemodel; import java.util.HashMap; import java.util.Map; /** * 键值对 * @author weidy */ public class KeyValue implements java.io.Serializable { /** * 禁止修改这个值 */ private static final long serialVersionUID = 7708882804529442626L; /** * 键 */ private String key; /** * 值 */ private String value; /** * 其他属性 */ private Map attributes = new HashMap(); public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public Map getAttributes() { return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } public void addAttr(String attr, Object attrValue){ this.attributes.put(attr, attrValue); } @Override public String toString() { return "KeyValue{" + "key='" + key + '\'' + ", value='" + value + '\'' + ", attributes=" + attributes + '}'; } }