ai.databand.config.SimpleProps Maven / Gradle / Ivy
package ai.databand.config;
import java.util.Collections;
import java.util.Map;
import java.util.Optional;
public class SimpleProps implements PropertiesSource {
private final Map props;
public SimpleProps(Map props) {
this.props = props;
}
public SimpleProps() {
this.props = Collections.emptyMap();
}
@Override
public Map values() {
return Collections.unmodifiableMap(props);
}
@Override
public Optional getValue(String key) {
return Optional.ofNullable(props.get(key));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy