com.sigopt.net.ParamsBuilder Maven / Gradle / Ivy
package com.sigopt.net;
import com.sigopt.model.APIObject;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
class ParamsBuilder {
public static Map build(Map params) {
Map ret = new HashMap();
params = MapHelper.ensure(params);
ret = MapHelper.merge(ret, params);
for (Map.Entry entry: ret.entrySet()) {
entry.setValue(APIObject.toJson(entry.getValue()));
}
return ret;
}
}