Java is Javascript

At least it is coming closer
 Enumeration getAttributeNames() {
final Entry ent[] = parseParams();
return new Enumeration() {
int j = 0;
public boolean hasMoreElements() {
return (j < ent.length);
}
public Object nextElement() {
return ent[j++].key;
}
};
}