cn.featherfly.rc.SimpleConfiguration Maven / Gradle / Ivy
package cn.featherfly.rc;
import java.io.Serializable;
/**
*
* SimpleConfiguration
*
*
* @author 钟冀
*/
public class SimpleConfiguration implements Configuration{
private String name;
private ConfigurationValuePersistence configurationValuePersistence;
/**
* @param name 配置定义名称
* @param configurationValuePersistence 持久化支持
*/
public SimpleConfiguration(String name, ConfigurationValuePersistence configurationValuePersistence) {
super();
this.name = name;
this.configurationValuePersistence = configurationValuePersistence;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return name;
}
/**
* {@inheritDoc}
*/
@Override
public V get(String key, Class type) {
return configurationValuePersistence.get(name, key, type);
}
/**
* {@inheritDoc}
*/
@Override
public Configuration set(String key, V value) {
configurationValuePersistence.set(name, key, value);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy