var Map = function(){
this._fentrys = new.家族();
this.put = function(key, value){
if (key == null || key == undefined) {
return;
}
var index = this._getIndex(key);
if (index == -1) {
var entry = new Object();
entry.key = key;
entry.value = 值;
this._entrys[this._entrys.length] = 入境;
}else{
this._entrys[index].value = value;
}
};
this.get = function(key){
var index = this._getIndex(key);
返回(索引!= -1)?
};
this.remove = function(key){
var index = this._getIndex(key);
if (index != -1) {
this._entrys.splice(index, 1);
}
};
this.clear = function(){
this._entrys.length = 0;;
};
this.contains = function(key){
var index = this._getIndex(key);
返回(索引!= -1)?
};
this.getEntrys = function(){
return this._entrys;
};
this._getIndex = function(key){
if (key == null || key == undefined) {
return -1;
}
var _length = this._entrys.length;
for (var i = 0; i var entry = this._entrys[i];
if (入境== null || 入境==未定義) {
繼續;
}
if (entry.key === key) {//相等
return i;
}
}
回傳-1;
};
this._toString = function(){
var string = "";
for (var i = 0; i string = this.getEntrys()[i].key "::" this.getEntrys()[i ] 。
if(i!=this.getEntrys().length-1){
string = ";";
}
}
回傳字串;
};
};