X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2FClassLibrary%2FHashMapIterator.java;h=d3516022cb21cd0665b1db95fa2c7a33922c1ebc;hb=HEAD;hp=70e1a405ccd52c7a4f43b47b008352c3518e9498;hpb=1eab95935ad60c6fb3838107ffa24b35ab133abf;p=IRC.git diff --git a/Robust/src/ClassLibrary/HashMapIterator.java b/Robust/src/ClassLibrary/HashMapIterator.java index 70e1a405..d3516022 100644 --- a/Robust/src/ClassLibrary/HashMapIterator.java +++ b/Robust/src/ClassLibrary/HashMapIterator.java @@ -1,46 +1,51 @@ -class HashMapIterator { - HashMap map; - int type; - int bin; - HashEntry he; +class HashMapIterator extends Iterator { + HashMap map; + int type; + int bin; + HashEntry he; - public HashMapIterator(HashMap map, int type) { - this.map=map; - this.type=type; - this.bin=0; - this.he=null; - } + public HashMapIterator(HashMap map, int type) { + this.map=map; + this.type=type; + this.bin=0; + this.he=null; + } - public boolean hasNext() { - if (he!=null&&he.next!=null) - return true; - int i=bin; - while((i