⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cacheconfig.java

📁 asp制作的在线考试系统
💻 JAVA
字号:
package cn.hxex.exam.config;

import java.util.List;
import java.util.Properties;
import java.util.Vector;

/**
 * 与配置文件中cache元素相对应的配置对象
 * 它是依据配置文件中的cache元素来生成的,
 * 是配置文件中cache元素的Java对象表现形式
 * 
 * @author galaxy
 *
 */
public class CacheConfig
{
	private List<Property> properties;

	private String type;

	/**
	 * @return Returns the type.
	 */
	public String getType()
	{
		return type;
	}

	/**
	 * @param type The type to set.
	 */
	public void setType(String type)
	{
		this.type = type;
	}

	/**
	 * 增加Cache初始化参数对象
	 * 
	 * @param property 初始化参数对象
	 */
	public void addProperty(Property property)
	{
		if (properties == null)
			properties = new Vector<Property>();

		properties.add(property);
	}

	/**
	 * 返回所有的初始化配置参数
	 * @return 配置文件中配置的初始化配置参数
	 */
	public Properties getProperties()
	{
		if (properties == null)
			return new Properties();

		// 将初始化参数转换为Java标准的属性类
		Properties props = new Properties();
		for (Property property : properties)
		{
			props.put(property.getName(), property.getValue());
		}
		return props;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -