-class HashMapIterator {
+class HashMapIterator extends Iterator {
HashMap map;
int type;
int bin;
he=he.next;
Object o;
if (type==0)
- o=he.key;
+ o=he.key;
else
- o=he.value;
+ o=he.value;
return o;
}
while((bin<map.table.length)&&
he=map.table[bin++];
Object o;
if (type==0)
- o=he.key;
+ o=he.key;
else
- o=he.value;
+ o=he.value;
return o;
} else System.error();
}
+
+ public void remove() {
+ System.out.println("HashMapIterator.remove() not implemented.");
+ System.exit(-1);
+ }
}