All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.databand.config.SimpleProps Maven / Gradle / Ivy

There is a newer version: 1.0.26.1
Show newest version
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