// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_HT = 3; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_RDB_TYPE_SET = 2;
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/entity/RedisCommandData.java
// public class RedisCommandData {
// 	/**
// 	 * 原始数据
// 	 */
// 	private byte[] data;
// 	/**
// 	 * 转换为字符串后的数据
// 	 */
// 	private String content;
// 
// 	public RedisCommandData(byte[] data) {
// 		super();
// 		this.data = data;
// 		this.content = new String(data);
// 	}
// 
// 	public byte[] getData() {
// 		return data;
// 	}
// 
// 	public void setData(byte[] data) {
// 		this.data = data;
// 	}
// 
// 	public String getContent() {
// 		return content;
// 	}
// 
// 	public void setContent(String content) {
// 		this.content = content;
// 	}
// 
// 	/*
// 	 * @see java.lang.Object#toString()
// 	 */
// 	@Override
// 	public String toString() {
// 		return "RedisCommandData [dataLength=" + data.length + ", content=" + content + "]";
// 	}
// 
// }


import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_HT;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_RDB_TYPE_SET;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.wmz7year.synyed.entity.RedisCommandData;
package com.wmz7year.synyed.parser.entry;




/**
 * redis set类型数据结构对象
 * 
 * @Title: RedisSetObject.java
 * @Package com.wmz7year.synyed.parser.entry
 * @author jiangwei (ydswcy513@gmail.com)
 * @date 2015年12月16日 下午3:56:00
 * @version V1.0
 */
public class RedisSetObject extends RedisObject {

	/**
	 * set中的元素
	 */
	private Set<RedisStringObject> elements = new HashSet<RedisStringObject>();

	public RedisSetObject() {

	}

	/**
	 * 添加set中的元素的方法
	 * 
	 * @param redisObject
	 *            redis
	 */
	public void addElement(RedisObject redisObject) {
		if (!(redisObject instanceof RedisStringObject)) {
			throw new IllegalStateException("元素类型错误 必须为RedisStringObject类型");
		}
		this.elements.add((RedisStringObject) redisObject);
	}

	/*
	 * @see com.wmz7year.synyed.parser.entry.RedisObject#getType()
	 */
	@Override
	public byte getType() {
		return REDIS_RDB_TYPE_SET;
	}

	/*
	 * @see com.wmz7year.synyed.parser.entry.RedisObject#getEncoding()
	 */
	@Override
	public byte getEncoding() {
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_HT = 3; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_RDB_TYPE_SET = 2;
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/entity/RedisCommandData.java
// public class RedisCommandData {
// 	/**
// 	 * 原始数据
// 	 */
// 	private byte[] data;
// 	/**
// 	 * 转换为字符串后的数据
// 	 */
// 	private String content;
// 
// 	public RedisCommandData(byte[] data) {
// 		super();
// 		this.data = data;
// 		this.content = new String(data);
// 	}
// 
// 	public byte[] getData() {
// 		return data;
// 	}
// 
// 	public void setData(byte[] data) {
// 		this.data = data;
// 	}
// 
// 	public String getContent() {
// 		return content;
// 	}
// 
// 	public void setContent(String content) {
// 		this.content = content;
// 	}
// 
// 	/*
// 	 * @see java.lang.Object#toString()
// 	 */
// 	@Override
// 	public String toString() {
// 		return "RedisCommandData [dataLength=" + data.length + ", content=" + content + "]";
// 	}
// 
// }


// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/parser/entry/RedisSetObject.java
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_HT;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_RDB_TYPE_SET;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.wmz7year.synyed.entity.RedisCommandData;

package com.wmz7year.synyed.parser.entry;




/**
 * redis set类型数据结构对象
 * 
 * @Title: RedisSetObject.java
 * @Package com.wmz7year.synyed.parser.entry
 * @author jiangwei (ydswcy513@gmail.com)
 * @date 2015年12月16日 下午3:56:00
 * @version V1.0
 */
public class RedisSetObject extends RedisObject {

	/**
	 * set中的元素
	 */
	private Set<RedisStringObject> elements = new HashSet<RedisStringObject>();

	public RedisSetObject() {

	}

	/**
	 * 添加set中的元素的方法
	 * 
	 * @param redisObject
	 *            redis
	 */
	public void addElement(RedisObject redisObject) {
		if (!(redisObject instanceof RedisStringObject)) {
			throw new IllegalStateException("元素类型错误 必须为RedisStringObject类型");
		}
		this.elements.add((RedisStringObject) redisObject);
	}

	/*
	 * @see com.wmz7year.synyed.parser.entry.RedisObject#getType()
	 */
	@Override
	public byte getType() {
		return REDIS_RDB_TYPE_SET;
	}

	/*
	 * @see com.wmz7year.synyed.parser.entry.RedisObject#getEncoding()
	 */
	@Override
	public byte getEncoding() {
		return REDIS_ENCODING_HT;