// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_LINKEDLIST = 4; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_LIST = 1;


import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_LINKEDLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_LIST;
import java.util.ArrayList;
import java.util.List;
package com.wmz7year.synyed.parser.entry;



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

	/**
	 * list中的元素
	 */
	private List<RedisStringObject> elements = new ArrayList<RedisStringObject>();

	public RedisListObject() {

	}

	/**
	 * 添加list中的元素的方法
	 * 
	 * @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() {
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_LINKEDLIST = 4; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_LIST = 1;


// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/parser/entry/RedisListObject.java
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_LINKEDLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_LIST;
import java.util.ArrayList;
import java.util.List;

package com.wmz7year.synyed.parser.entry;



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

	/**
	 * list中的元素
	 */
	private List<RedisStringObject> elements = new ArrayList<RedisStringObject>();

	public RedisListObject() {

	}

	/**
	 * 添加list中的元素的方法
	 * 
	 * @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_LIST;