HashMap = function(){
this.map = new Array();
};
HashMap.prototype = {
put : function(key, value){
this.map[key] = value;
},
get : function(key) {
return this.map[key];
},
getAll : function () {
return this.map;
},
clear : function () {
this.map = new Array();
},
getKeys : function () {
var keys = new Array();
for(var i in this.map){
keys.push(i);
}
return keys;
}
}
function List() {
this.elements = {};
this.idx = 0;
this.length = 0;
}
List.prototype.add = function(element) {
this.length++;
this.elements[this.idx++] = element;
};
List.prototype.get = function(idx) {
return this.elements[idx];
};