legolas.config.api.interfaces.Configuration Maven / Gradle / Ivy
package legolas.config.api.interfaces;
import toolbox.data.interfaces.HashObject;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public class Configuration extends HashObject {
private Configuration(Map values) {
super(values);
}
public static Configuration create(Map configMap) {
return new Configuration(configMap);
}
public static Configuration create(Properties properties) {
Map configMap = new HashMap<>();
properties.entrySet().forEach(entry -> {
configMap.put(entry.getKey().toString(), entry.getValue());
});
return create(configMap);
}
@Override
protected String toString(Entry entry) {
return entry.value();
}
public static Configuration create() {
return new Configuration(new HashMap<>());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy