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

com.sigopt.model.Parameter Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
package com.sigopt.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class Parameter extends StructObject {
    public Parameter() {
        super();
    }

    public String getName() {
        return (String) this.get("name");
    }

    public String getType() {
        return (String) this.get("type");
    }

    public Bounds getBounds() {
        return Utils.mergeInto(new Bounds(), this.get("bounds"));
    }

    public List getCategoricalValues() {
        return Utils.mergeIntoList(new ArrayList(), this.get("categorical_values"), CategoricalValue.class);
    }

    public Conditions getConditions() {
        return Utils.mergeInto(new Conditions(), this.get("conditions"));
    }

    public static class Builder {
        Parameter p;

        public Builder() {
            this.p = new Parameter();
        }

        public Parameter build() {
            return this.p;
        }

        public Builder name(String name) {
            this.p.set("name", name);
            return this;
        }

        public Builder type(String type) {
            this.p.set("type", type);
            return this;
        }

        public Builder bounds(Bounds bounds) {
            this.p.set("bounds", bounds);
            return this;
        }

        public Builder categoricalValues(List categoricalValues) {
            this.p.set("categorical_values", categoricalValues);
            return this;
        }

        public Builder conditions(Map> conditions) {
            this.p.set("conditions", conditions);
            return this;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy