
com.imsweb.algorithms.AlgorithmParam Maven / Gradle / Ivy
/*
* Copyright (C) 2019 Information Management Services, Inc.
*/
package com.imsweb.algorithms;
import java.util.List;
/**
* Abstraction of a "parameter" that an algorithm needs to be executed.
*/
public class AlgorithmParam {
public static AlgorithmParam of(String id, String name, Class type) {
AlgorithmParam param = new AlgorithmParam<>();
param.setId(id);
param.setName(name);
param.setType(type);
return param;
}
public static AlgorithmParam of(String id, String name, Class type, List allowedValues) {
AlgorithmParam param = new AlgorithmParam<>();
param.setId(id);
param.setName(name);
param.setType(type);
param.setAllowedValues(allowedValues);
return param;
}
// parameter ID
private String _id;
// parameter name
private String _name;
// parameter type
private Class _type;
// allowed values for this parameter (leave null for allowing any values)
private List _allowedValues;
public String getId() {
return _id;
}
public void setId(String id) {
_id = id;
}
public String getName() {
return _name;
}
public void setName(String name) {
_name = name;
}
public Class getType() {
return _type;
}
public void setType(Class type) {
_type = type;
}
public List getAllowedValues() {
return _allowedValues;
}
public void setAllowedValues(List allowedValues) {
_allowedValues = allowedValues;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy