this.getkey=getkey;
function getkey() {
return this.key;
}
this.getvalue=getvalue;
function getvalue() {
return this.value;
}
this.setvalue=setvalue;
function setvalue(newvalue) {
var oldvalue = this.value;
this.value = newvalue;
return oldvalue;
}
this.equals=equals;
function equals(o) {
var e = o;
var k1 = this.getkey();
var k2 = e.getkey();
var v1 = this.getvalue();
var v2 = e.getvalue();
return (k1.equals(k2) && v1.equals(v2));
}
this.hashcode=hashcode;
function hashcode() {
return this.key.hashcode() ^ this.value.hashcode();
}
this.tostring=tostring;
function tostring() {
return this.getkey() + "=" + this.getvalue();
}
}
function hashiterator(table,index,ne){
this.table=table;
this.ne=ne;
this.index=index;
this.current=null;
this.hasnext=hasnext;
function hasnext() {
return this.ne != null;
}
this.next=next;
function next() {
var e = this.ne;
if (e == null)
throw "no such element";
var n = e.next;
var t = this.table;
var i = this.index;
while (n == null && i > 0)
n = t[--i];
this.index = i;
this.ne = n;
this.current=e;
return this.current;
}
}