io.scalecube.config.StringConfigPropertyImpl Maven / Gradle / Ivy
package io.scalecube.config;
import io.scalecube.config.source.LoadedConfigProperty;
import java.util.Map;
class StringConfigPropertyImpl extends AbstractSimpleConfigProperty
implements StringConfigProperty {
StringConfigPropertyImpl(
String name,
Map propertyMap,
Map> propertyCallbackMap) {
super(name, String.class, propertyMap, propertyCallbackMap, ConfigRegistryImpl.STRING_PARSER);
}
@Override
public String value(String defaultValue) {
return super.valueAsString(defaultValue);
}
@Override
public String valueOrThrow() {
return value().orElseThrow(this::newNoSuchElementException);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy