com.belteshazzar.jquery.PlainObject Maven / Gradle / Ivy
The newest version!
package com.belteshazzar.jquery;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.belteshazzar.jquery.functions.PromiseBooleanVoidFunction;
import com.belteshazzar.jquery.functions.PromiseIntIntVoidFunction;
import com.belteshazzar.jquery.functions.PromiseVoidFunction;
import java.util.Set;
import netscape.javascript.JSObject;
public class PlainObject {
private Map values;
public PlainObject() {
values = new HashMap();
}
public PlainObject(JSObject js) {
this();
final JSObject names = (JSObject)js.eval("(function (obj) { var names = []; for (var name in obj) names.push(name); return names; })(this)");
final int count = (int)names.getMember("length");
for (int i=0 ; i keys() {
return values.keySet();
}
public Collection