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

org.opentripplanner.ext.dataoverlay.configuration.ParameterBinding Maven / Gradle / Ivy

package org.opentripplanner.ext.dataoverlay.configuration;

import java.io.Serializable;
import org.opentripplanner.ext.dataoverlay.api.ParameterName;
import org.opentripplanner.ext.dataoverlay.routing.Parameter;
import org.opentripplanner.util.lang.ToStringBuilder;

/**
 * This class describes the expected routing request parameter for the generic data
 * 

* Example parameter config: *

 * {
 *   "name": "harmful_micro_particles_PM2_5",
 *   "variable": "harmfulMicroparticlesPM2_5",
 *   "formula": "(VALUE + 1 - THRESHOLD) * PENALTY"
 * }
 * 
*/ public class ParameterBinding implements Serializable { private static final long serialVersionUID = 1L; private final ParameterName name; private final String variable; private final String formula; public ParameterBinding(ParameterName name, String variable, String formula) { this.name = name; this.variable = variable; this.formula = formula; } public ParameterName getName() { return name; } public String getVariable() { return variable; } public String getFormula() { return formula; } @Override public String toString() { return ToStringBuilder .of(Parameter.class) .addEnum("name", name) .addStr("variable", variable) .addStr("formula", formula) .toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy