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

📄 travvaluemapbean.java

📁 这是jsp通用模块导航的程序原代码,里面有新闻,bbs等jsp与javabean结合的程序.
💻 JAVA
字号:
/*
 * Crecom.wxpn.tutorial.ec.util* TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.wxpn.tutorial.ec.util;

import java.util.AbstractList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;


public class TravValueMapBean {
	
	private Map map = null;

	public TravValueMapBean() {
		this.map = Collections.synchronizedMap(new LinkedHashMap());
	}

	public TravValueMapBean(Map map) {
		this.map = map;
	}

	public Object getValue(String key) {
		return this.map.get(key);
	}

	public Map getValues() {
		return this.map;
	}
	
	public void setValue(String key, Object value) {
		this.map.put(key, value);
	}

	public void setValues(Map map) {
		this.map = map;
	}
	
	public String getValStr(String key) {
		String tmpStr = "";
		Object tmpObj = this.map.get(key);
		if (tmpObj != null) {
			tmpStr = tmpObj.toString();
		}
		return tmpStr;
	}
	//make sure the Integer.parseInt (made by Liuyang 2006/01/18)
	public String getIntStr(String key) {
		String tmpStr = "0";
		Object tmpObj = this.map.get(key);
		if (tmpObj != null&& tmpObj!="") {
			tmpStr = tmpObj.toString();
		}
		return tmpStr;
	}
	
	

	public Iterator getIterator() {
		Iterator iterator = this.map.keySet().iterator();
		return iterator;
	}
	

	public void put(String key, Object value) {
		this.map.put(key, value);
	}


	public Object get(String key) {
		return this.map.get(key);
	}
	

	public int size() {
		return this.map.size();
	}	


	public boolean isEmpty() {
		return this.map.isEmpty();
	}
	

	public void remove(String key) {
		this.map.remove(key);
	}

	
	
	
	

	// 巜掕僉乕乮暋悢乯傪嶍彍偡傞
	public void removeKeys(String[] removeKeyArray) {
		if (removeKeyArray == null) return;
		for (int i=0; i<removeKeyArray.length; i++) {
			if (this.map.containsKey(removeKeyArray[i])) {
				remove(removeKeyArray[i]);
			}
		}
	}


	
}

⌨️ 快捷键说明

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