// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_SKIPLIST = 7; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ZSET = 3;


import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_SKIPLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ZSET;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
package com.wmz7year.synyed.parser.entry;



/**
 * redis zset类型数据结构对象
 * 
 * @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 RedisZSetObject extends RedisObject {

	private List<ZSetValue> elements = null;

	public RedisZSetObject(int zsetlen) {
		this.elements = new ArrayList<ZSetValue>(zsetlen);
	}

	/**
	 * 向指定位置插入元素的方法
	 * 
	 * @param redisObject
	 *            需要插入的元素
	 * @param score
	 *            指定的位置
	 */
	public void addElement(RedisObject redisObject, double score) {
		if (!(redisObject instanceof RedisStringObject)) {
			throw new IllegalStateException("元素类型错误 必须为RedisStringObject类型");
		}
		elements.add(new ZSetValue(redisObject, score));
	}

	/*
	 * @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_SKIPLIST = 7; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ZSET = 3;


// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/parser/entry/RedisZSetObject.java
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_SKIPLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ZSET;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

package com.wmz7year.synyed.parser.entry;



/**
 * redis zset类型数据结构对象
 * 
 * @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 RedisZSetObject extends RedisObject {

	private List<ZSetValue> elements = null;

	public RedisZSetObject(int zsetlen) {
		this.elements = new ArrayList<ZSetValue>(zsetlen);
	}

	/**
	 * 向指定位置插入元素的方法
	 * 
	 * @param redisObject
	 *            需要插入的元素
	 * @param score
	 *            指定的位置
	 */
	public void addElement(RedisObject redisObject, double score) {
		if (!(redisObject instanceof RedisStringObject)) {
			throw new IllegalStateException("元素类型错误 必须为RedisStringObject类型");
		}
		elements.add(new ZSetValue(redisObject, score));
	}

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