View Javadoc
1   package com.foxinmy.weixin4j.util;
2   
3   import java.io.Serializable;
4   
5   import com.alibaba.fastjson.annotation.JSONCreator;
6   import com.alibaba.fastjson.annotation.JSONField;
7   
8   /**
9    * name-value
10   * 
11   * @className NameValue
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年3月29日
14   * @since JDK 1.6
15   * @see
16   */
17  public class NameValue implements Serializable {
18  
19  	private static final long serialVersionUID = -348620146718819093L;
20  	private String name;
21  	private String value;
22  
23  	@JSONCreator
24  	public NameValue(@JSONField(name = "name") String name,
25  			@JSONField(name = "value") String value) {
26  		this.name = name;
27  		this.value = value;
28  	}
29  
30  	public String getName() {
31  		return name;
32  	}
33  
34  	public String getValue() {
35  		return value;
36  	}
37  
38  	@Override
39  	public String toString() {
40  		return "NameValue [name=" + name + ", value=" + value + "]";
41  	}
42  }