类 KVRecords
- java.lang.Object
-
- xin.manong.weapon.base.record.KVRecords
-
- 所有已实现的接口:
Serializable
public class KVRecords extends Object implements Serializable
KV数据列表- 作者:
- frankcl
- 另请参阅:
- 序列化表格
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddRecord(KVRecord kvRecord)添加KVRecord 如果KVRecord为null,不生效voidaddRecords(KVRecords kvRecords)添加KVRecord列表 如果KVRecord列表为null或者为空,不生效voidclear()清除所有记录KVRecordscopy()拷贝KVRecordgetRecord(int index)获取指定下标的KVRecordintgetRecordCount()获取KVRecord数量booleanisEmpty()判断KVRecord列表是否为空StringtoString()
-
-
-
构造器详细资料
-
KVRecords
public KVRecords()
-
KVRecords
public KVRecords(KVRecord record)
-
-
方法详细资料
-
copy
public KVRecords copy()
拷贝- 返回:
- 拷贝数据
-
getRecordCount
public int getRecordCount()
获取KVRecord数量- 返回:
- 大于等于0的值
-
isEmpty
public boolean isEmpty()
判断KVRecord列表是否为空- 返回:
- 为空返回true,否则返回false
-
getRecord
public KVRecord getRecord(int index)
获取指定下标的KVRecord- 参数:
index- 下标,必须大于等于0且小于记录数- 返回:
- 如果下标合法返回KVRecord,否则返回null
-
addRecord
public void addRecord(KVRecord kvRecord)
添加KVRecord 如果KVRecord为null,不生效- 参数:
kvRecord- 添加KVRecord
-
addRecords
public void addRecords(KVRecords kvRecords)
添加KVRecord列表 如果KVRecord列表为null或者为空,不生效- 参数:
kvRecords- 添加KVRecord列表
-
clear
public void clear()
清除所有记录
-
-