/** * override method 'clone' * * @see java.lang.Object#clone() * @return Object 克隆后对象 * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { super.clone(); RmCommonVo vo = new RmCommonVo(); for (String key : mapAttribute.keySet()) { String thisValue = this.getString(key); vo.put(key, thisValue); } return vo; }
/** 构造函数: 初始化属性,私有构造函数 */ public RmCommonVo(Map<String, Object> m) { this(); for (Map.Entry<String, Object> en : m.entrySet()) { put(en.getKey(), en.getValue()); } }