ai.databand.parameters.ParametersPreview Maven / Gradle / Ivy
/*
* © Copyright Databand.ai, an IBM Company 2022
*/
package ai.databand.parameters;
import org.apache.spark.sql.Dataset;
import java.util.HashMap;
import java.util.Map;
public class ParametersPreview {
private final Map> parameters;
private final ObjectPreview objectPreview;
public ParametersPreview(boolean previewEnabled) {
parameters = new HashMap<>(1);
if (previewEnabled) {
parameters.put(String.class.getCanonicalName(), new StringPreview());
parameters.put(Dataset.class.getCanonicalName(), new DatasetPreview());
parameters.put(String[].class.getCanonicalName(), new StringArrayPreview());
} else {
parameters.put(String.class.getCanonicalName(), new StringPreview());
parameters.put(String[].class.getCanonicalName(), new StringArrayPreview());
}
objectPreview = new ObjectPreview();
}
public TaskParameterPreview get(Class> clazz) {
return parameters.getOrDefault(clazz.getCanonicalName(), objectPreview);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy