- 243
- 0
- 约26.84万字
- 约 322页
- 2018-12-11 发布于湖北
- 举报
WTScada 组态软件 Javascript API 手册
ht.List 类
ht.List function (){};
/**
* 增加元素
* @param {Object} item 新元素
* @param {Number} [index] 插入索引
*/
add = function (item, index){};
/**
* 将一批元素加入到当前集合中
* @param {Array|ht.List} array 元素数组或集合
*/
addAll = function (array){};
/**
* 清空集合
*/
clear = function (){};
/**
* 判断当前集合是否包含参数元素
* @param {Object} item 是否包含此元素
*/
contains = function (item){};
/**
* 提供一个回调函数遍历此集合
* @param {Function} func 遍历函数
* @param {Object} [scope] 函数域
* @example list.each(function(item) {
* console.log(item);
* });
*/
each = function (func, scope){};
/**
* 返回索引位置的的元素
* @param {Number} index 索引
* @return {Object} 处于索引位置的元素
*/
get = function (index){};
/**
* 获取类声明(构造函数)
* @return {Function} 类声明(构造函数)
*/
getClass = function (){};
/**
* 获取类全名
* @return {String} 类全名
*/
getClassName = function (){};
/**
* 获取父类声明(构造函数)
* @return {Function} 父类声明(构造函数)
*/
getSuperClass = function (){};
/**
* 获得参数元素的索引
* @param {Object} item 元素
* @return {Number} 元素的索引
*/
indexOf = function (item){};
/**
* 判断集合是否为空
* @return {Boolean} 集合是否为空
*/
isEmpty = function (){};
/**
* 将参数元素从集合中删除
* @param {Object} item 要删除的元素
* @return {Number} 要删除的元素的索引
*/
remove = function (item){};
/**
* 删除索引位置的元素
* @param {Number} index 要删除的索引
* @return {Ojbect} 删除的元素
*/
removeAt = function (index){};
/**
* 将集合中的元素顺序倒序排序
*/
reverse = function (){};
/**
* 提供一个回调函数倒序遍历此集合
* @param {Function} func 遍历函数
* @param {Object} [scope] 函数域
* @example list.reverseEach(function(item) {
* console.log(item);
* });
*/
reverseEach = function (){};
/**
* 设置索引处的元素
* @param {Number} index 索引,如果此索引处存在元素则将其替换
* @param {Object} item 新元素
*/
set = function (index, item){};
/**
* 获取集合中的元素数
* @return {Number} 集合中的元素数
*/
size = function (){};
/**
* 提取集合中的部分元素组成一个新集合并返回
* @param {Number} start 开始索引(包含)
* @param {Number} end 结束索引(不包含)
原创力文档

文档评论(0)