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

cn.featherfly.rc.SimpleConfiguration Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version

package cn.featherfly.rc;

import java.io.Serializable;

import cn.featherfly.common.lang.AssertIllegalArgument;

/**
 * 

* SimpleConfiguration *

* * @author 钟冀 */ public class SimpleConfiguration implements Configuration { private String name; private String descp; private ConfigurationRepository configurationRepository; /** * @param name 配置定义名称 * @param descp 配置定义描述 * @param configurationRepository 存储支持 */ public SimpleConfiguration(String name, String descp, ConfigurationRepository configurationRepository) { super(); AssertIllegalArgument.isNotNull(name, "name"); AssertIllegalArgument.isNotNull(configurationRepository, "configurationRepository"); this.name = name; this.descp = descp; this.configurationRepository = configurationRepository; } /** * {@inheritDoc} */ @Override public V get(String key, Class type) { return configurationRepository.get(name, key, type); } /** * {@inheritDoc} */ @Override public Configuration set(String key, V value) { configurationRepository.set(name, key, value); return this; } /** * {@inheritDoc} */ @Override public String getName() { return name; } /** * {@inheritDoc} */ @Override public String getDescp() { return descp; } /** * {@inheritDoc} */ @Override public String toString() { return "SimpleConfiguration [name=" + name + ", descp=" + descp + "]"; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy