function MyMap() {
var items = {}; this.has = function (key) {
return key in items;
};
this.set = function (key, value) {
items[key] = value;
};
this.remove = function (key) {
if (this.has(key)) {
delete items[key];
return true;
}
return false;
};
this.get = function (key) {
return this.has(key) ? items[key] : undefined;
};
this.values = function () {
var values = new Array();
for (var k in items) {
if (this.has(k)) {
values.push(items[k]);
}
}
return values;
};
this.getItems = function () {
return items;
};
this.clear = function () {
items = {};
};
this.getCount = function () {
return Object.keys(items).length;
}; }

最新文章

  1. 显示快照监控:/SDF/MON
  2. 服务器重启后SQL Server Agent由于"The EventLog service has not been started" 启动失败
  3. Centos 7 ASP.NET Core 1.0 Docker部署
  4. maven继承parent,relativePath warn信息的解决办法
  5. 推荐一个linux下的web压力测试工具神器webbench
  6. 从Wordpress迁移到Jekyll
  7. [React] Using the classnames library for conditional CSS
  8. android中设置TextView/Button 走马灯效果
  9. MLAPP——概率机器学习知识汇总
  10. Unity Object Pool完全体
  11. phpstudy中的mysql
  12. c# 语法要点速览
  13. P1546 最短网络 Agri-Net题解(克鲁斯卡尔)
  14. centos查看自启动服务
  15. [转帖]国产闪存颗粒终于熬出头 紫光存储S100固态硬盘评测
  16. Android: Custom View和include标签的区别
  17. css中实现ul两端的li对齐外面边缘
  18. wifiphisher使用介绍
  19. windows服务的安装和卸载方法
  20. c#简单加密和对称加密

热门文章

  1. 有趣的filter
  2. 理解for循环
  3. 代码实战之AdaBoost
  4. git log 查看提交记录,参数:
  5. jackson用法
  6. java基础-Idea开发工具介绍
  7. ElasticSearch 例子
  8. centOS7环境下安装jdk1.8
  9. Codeforces 264 B. Good Sequences
  10. PageRank简单实现中的一个错误