摘要: Array.prototype.remove = function(s) { for (var i = 0; i < this.length; i++) { if (s == this[i]) this.splice(i, 1); }}/** * Simple Map * * * var m = new Map(); * m.put('key','value'); * ... * var s = ""; * m.each(function(key,value,index){ * s += index+":"+ key 阅读全文
posted @ 2012-12-21 12:12 牧涛 阅读(22046) 评论(1) 推荐(0)
摘要: 删除map:@Test public void removeElementFromMap() { Map<Integer, String> test = new HashMap<Integer, String>(); test.put(1, "a"); test.put(2, "b"); test.put(3, "c"); test.put(4, "d"); Iterator<Entry<Integer, String>> it = test.entrySet().i 阅读全文
posted @ 2012-12-21 11:06 牧涛 阅读(5147) 评论(1) 推荐(0)