tech.kronicle.utils.UriVariablesBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kronicle-utils Show documentation
Show all versions of kronicle-utils Show documentation
Kronicle utils library that contains utility classes for use by Kronicle and its plugins
package tech.kronicle.utils;
import java.util.HashMap;
import java.util.Map;
public class UriVariablesBuilder {
private final Map uriVariables = new HashMap<>();
private UriVariablesBuilder() {
}
public static UriVariablesBuilder builder() {
return new UriVariablesBuilder();
}
public UriVariablesBuilder addUriVariable(String name, Object value) {
if (uriVariables.containsKey(name)) {
throw new UnsupportedOperationException(String.format("Name %s already exists", name));
}
uriVariables.put(name, value.toString());
return this;
}
public Map build() {
return Map.copyOf(uriVariables);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy