function Map(B){this.buckets=new Array();
if(isNaN(B)||B<1){B=10
}for(var A=0;
A<B;
A++){this.buckets[A]=new Bucket()
}}function Hashable(){}Hashable.prototype.hashCode=-1;
Hashable.prototype.hash=function(){if(this.hashCode==undefined){this.hashCode=-1
}with(this){if(hashCode==-1){hashCode=0;
var str=toString();
for(var i=0;
i<str.length;
i++){hashCode^=str.charCodeAt(i)
}}return hashCode
}};
Map.prototype.bucketFor=function(obj){with(this){return buckets[obj.hash()%buckets.length]
}};
Map.prototype.size=function(){var sz=0;
with(this){for(var i=0;
i<buckets.length;
i++){sz+=buckets[i].depth
}}return sz
};
Map.prototype.isEmpty=function(){with(this){for(var i=0;
i<buckets.length;
i++){if(buckets[i].depth>0){return false
}}}return true
};
Map.prototype.keys=function(){var a=new Array();
with(this){var bucket,e;
for(var i=0;
i<buckets.length;
i++){bucket=buckets[i];
for(e=bucket.first;
e!=null;
e=e.next){a[a.length]=e.key
}}}return a
};
Map.prototype.values=function(){var a=new Array();
with(this){var bucket,e;
for(var i=0;
i<buckets.length;
i++){bucket=buckets[i];
for(e=bucket.first;
e!=null;
e=e.next){a[a.length]=e.value
}}}return a
};
Map.prototype.containsKey=function(key){if(key&&key!=null){with(this){var bucket=bucketFor(key);
for(var e=bucket.first;
e!=null;
e=e.next){if(e.key==key){return true
}}}}return false
};
Map.prototype.containsValue=function(value){if(value){with(this){var bucket,e;
for(var i=0;
i<buckets.length;
i++){bucket=buckets[i];
for(e=bucket.first;
e!=null;
e=e.next){if(e.value==value){return true
}}}}}return false
};
Map.prototype.put=function(key,value){with(this){return(key&&key!=null&&value!=null)?bucketFor(key).add(key,value):null
}};
Map.prototype.get=function(key){if(key&&key!=null){with(this){var bucket=bucketFor(key);
for(var e=bucket.first;
e!=null;
e=e.next){if(e.key==key){return e.value
}}}}return null
};
Map.prototype.remove=function(key){if(key&&key!=null){with(this){return bucketFor(key).remove(key)
}}return null
};
Map.prototype.clear=function(){with(this){for(var i=0;
i<buckets.length;
i++){buckets[i].clear()
}}};
Map.prototype.toString=function(){return"[object Map]"
};
function Bucket(){this.depth=0;
this.first=null
}Bucket.prototype.add=function(key,value){with(this){if(first!=null){for(var e=first;
e!=null;
e=e.next){if(e.key==key){var old=e.value;
e.value=value;
return old
}}}first=new Entry(key,value,first);
depth++
}return null
};
Bucket.prototype.remove=function(key){with(this){if(first!=null){for(var e=first,prev=null;
e!=null;
prev=e,e=e.next){if(e.key==key){if(prev==null){first=e.next
}else{prev.next=e.next
}depth--;
return e.value
}}}}return null
};
Bucket.prototype.clear=function(){with(this){first=null;
depth=0
}};
Bucket.prototype.toString=function(){return"[object Bucket]"
};
function Entry(B,C,A){this.key=B;
this.value=C;
this.next=A?A:null
}Entry.prototype.toString=function(){return"[object Entry]"
};