if(i > oldSize) setSize(i);
insertElementAt(val,i);
}
+ return;
}
if(isString(key)) {
if (JS.toString(key).equals("length")) {
super.put(key,val);
}
- // FIXME: Needs to include super's keys
- public Enumeration keys() {
- return new Enumeration() {
- private int n = size();
- public boolean hasMoreElements() { return n > 0; }
- public Object nextElement() {
- if(n == 0) throw new NoSuchElementException();
- return new Integer(--n);
+ public Enumeration keys() throws JSExn {
+ return new Enumeration(super.keys()) {
+ private int n = 0;
+ public boolean _hasMoreElements() { return n < size(); }
+ public JS _nextElement() {
+ return n >= size() ? null : JS.N(n++);
}
};
}