fi.jubic.easyconfig.internal.parameter.MappableObject Maven / Gradle / Ivy
package fi.jubic.easyconfig.internal.parameter;
import fi.jubic.easyconfig.internal.Result;
import fi.jubic.easyconfig.internal.initializers.Initializer;
import fi.jubic.easyconfig.providers.EnvProvider;
public class MappableObject implements Mappable {
private final String prefix;
private final Initializer initializer;
public MappableObject(
String prefix,
Initializer initializer
) {
this.prefix = prefix;
this.initializer = initializer;
}
@Override
public Result initialize(String prefix, EnvProvider envProvider) {
return initializer.initialize(prefix + this.prefix, envProvider);
}
}