public Enumeration keys() {
return new Enumeration() {
- int cur = 0;
- public boolean hasMoreElements() { return cur >= size(); }
+ private int cur = 0;
+ public boolean hasMoreElements() { return cur < size(); }
public Object nextElement() {
if (cur >= size()) throw new NoSuchElementException();
return new Integer(cur++);