All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sigopt.net.ParamsBuilder Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy