亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? memorydictionary.java

?? TinyRadius is a simple, small and fast Java Radius library capable of sending and receiving Radius
?? JAVA
字號:
/**
 * $Id: MemoryDictionary.java,v 1.2 2006/09/24 10:06:38 wuttke Exp $
 * Created on 28.08.2005
 * @author mw
 * @version $Revision: 1.2 $
 */
package org.tinyradius.dictionary;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * A dictionary that keeps the values and names in hash maps
 * in the memory. The dictionary has to be filled using the
 * methods <code>addAttributeType</code> and
 * <code>addVendor</code>.
 * @see #addAttributeType(AttributeType)
 * @see #addVendor(int, String)
 * @see org.tinyradius.dictionary.Dictionary
 * @see org.tinyradius.dictionary.WritableDictionary
 */
public class MemoryDictionary 
implements WritableDictionary {

	/**
	 * Returns the AttributeType for the vendor -1 from the
	 * cache.
	 * @param typeCode attribute type code
	 * @return AttributeType or null
	 * @see org.tinyradius.dictionary.Dictionary#getAttributeTypeByCode(int)
	 */
	public AttributeType getAttributeTypeByCode(int typeCode) {
		return getAttributeTypeByCode(-1, typeCode);
	}
	
	/**
	 * Returns the specified AttributeType object.
	 * @param vendorCode vendor ID or -1 for "no vendor"
	 * @param typeCode attribute type code
	 * @return AttributeType or null
	 * @see org.tinyradius.dictionary.Dictionary#getAttributeTypeByCode(int, int)
	 */
	public AttributeType getAttributeTypeByCode(int vendorCode, int typeCode) {
		Map vendorAttributes = (Map)attributesByCode.get(new Integer(vendorCode));
		if (vendorAttributes == null)
			return null;
		else
			return (AttributeType)vendorAttributes.get(new Integer(typeCode));
	}
	
	/**
	 * Retrieves the attribute type with the given name.
	 * @param typeName name of the attribute type 
	 * @return AttributeType or null
	 * @see org.tinyradius.dictionary.Dictionary#getAttributeTypeByName(java.lang.String)
	 */
	public AttributeType getAttributeTypeByName(String typeName) {
		return (AttributeType)attributesByName.get(typeName);
	}
	
	/**
	 * Searches the vendor with the given name and returns its
	 * code. This method is seldomly used.
	 * @param vendorName vendor name
	 * @return vendor code or -1
	 * @see org.tinyradius.dictionary.Dictionary#getVendorId(java.lang.String)
	 */
	public int getVendorId(String vendorName) {
		for (Iterator i = vendorsByCode.entrySet().iterator(); i.hasNext();) {
			Map.Entry e = (Map.Entry)i.next();
			if (e.getValue().equals(vendorName))
				return ((Integer)e.getKey()).intValue();
		}
		return -1;
	}
	
	/**
	 * Retrieves the name of the vendor with the given code from
	 * the cache.
	 * @param vendorId vendor number
	 * @return vendor name or null
	 * @see org.tinyradius.dictionary.Dictionary#getVendorName(int)
	 */
	public String getVendorName(int vendorId) {
		return (String)vendorsByCode.get(new Integer(vendorId));
	}
	
	/**
	 * Adds the given vendor to the cache.
	 * @param vendorId vendor ID
	 * @param vendorName name of the vendor
	 * @exception IllegalArgumentException empty vendor name, invalid vendor ID
	 */
	public void addVendor(int vendorId, String vendorName) {
		if (vendorId < 0)
			throw new IllegalArgumentException("vendor ID must be positive");
		if (getVendorName(vendorId) != null)
			throw new IllegalArgumentException("duplicate vendor code");
		if (vendorName == null || vendorName.length() == 0)
			throw new IllegalArgumentException("vendor name empty");
		vendorsByCode.put(new Integer(vendorId), vendorName);
	}
	
	/**
	 * Adds an AttributeType object to the cache.
	 * @param attributeType AttributeType object
	 * @exception IllegalArgumentException duplicate attribute name/type code
	 */
	public void addAttributeType(AttributeType attributeType) {
		if (attributeType == null)
			throw new IllegalArgumentException("attribute type must not be null");
		
		Integer vendorId = new Integer(attributeType.getVendorId());
		Integer typeCode = new Integer(attributeType.getTypeCode());
		String attributeName = attributeType.getName();
		
		if (attributesByName.containsKey(attributeName))
			throw new IllegalArgumentException("duplicate attribute name: " + attributeName);
		
		Map vendorAttributes = (Map)attributesByCode.get(vendorId);
		if (vendorAttributes == null) {
			vendorAttributes = new HashMap();
			attributesByCode.put(vendorId, vendorAttributes);
		}
		if (vendorAttributes.containsKey(typeCode))
			throw new IllegalArgumentException("duplicate type code: " + typeCode);
		
		attributesByName.put(attributeName, attributeType);
		vendorAttributes.put(typeCode, attributeType);
	}
	
	private Map vendorsByCode = new HashMap();		// <Integer, String>
	private Map attributesByCode = new HashMap();	// <Integer, <Integer, AttributeType>>
	private Map attributesByName = new HashMap();	// <String, AttributeType>
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人高清视频| 69p69国产精品| 欧美日韩国产片| 一区二区三区国产| 成人av免费观看| 日韩免费在线观看| 久久精品国产在热久久| 日韩三级在线免费观看| 午夜精品在线视频一区| 欧美精品国产精品| 免费在线观看不卡| 精品国产一区二区国模嫣然| 久久激情五月婷婷| 国产欧美一区二区精品忘忧草| 国产剧情一区在线| 国产精品成人免费| 91日韩精品一区| 午夜精品久久久久久久久久久| 欧美高清视频一二三区 | 三级亚洲高清视频| 337p亚洲精品色噜噜噜| 九九国产精品视频| 中文欧美字幕免费| 91国偷自产一区二区开放时间| 亚洲大片免费看| 91精品国产乱| 丁香桃色午夜亚洲一区二区三区| 中文字幕欧美区| 欧美人与性动xxxx| 国产在线视频精品一区| 最新不卡av在线| 欧美一级黄色大片| 国产精品白丝jk黑袜喷水| 亚洲免费视频成人| 日韩一区二区在线看片| 激情综合色综合久久综合| 国产偷国产偷精品高清尤物| 色婷婷亚洲综合| 美女一区二区视频| 国产欧美精品区一区二区三区| 91视频91自| 狠狠狠色丁香婷婷综合激情| 亚洲欧洲综合另类| 日韩美女一区二区三区四区| 色悠悠亚洲一区二区| 国产电影一区二区三区| 麻豆精品一二三| 亚洲国产精品久久艾草纯爱| 国产精品乱子久久久久| 亚洲精品在线电影| 欧美一区日韩一区| 在线亚洲欧美专区二区| 高清在线不卡av| 国产尤物一区二区| 免费观看成人av| 天天av天天翘天天综合网 | 天天av天天翘天天综合网色鬼国产| 中文字幕欧美日本乱码一线二线| 精品久久久久久久久久久久久久久 | 亚洲国产精品成人综合色在线婷婷 | 人禽交欧美网站| 午夜久久久久久电影| 亚洲午夜激情网页| 亚洲一区视频在线| 樱桃视频在线观看一区| 1区2区3区国产精品| 中文字幕欧美日本乱码一线二线| 久久美女高清视频| 久久综合九色综合97_久久久 | 国产视频一区在线播放| 国产日韩三级在线| 国产色产综合色产在线视频| 久久免费精品国产久精品久久久久 | 亚洲一区二区影院| 亚洲综合激情网| 亚洲国产一区二区三区| 亚洲成人免费在线| 日日夜夜精品免费视频| 蜜臀va亚洲va欧美va天堂| 麻豆精品在线播放| 国产麻豆精品theporn| 粉嫩av亚洲一区二区图片| 国产精品1024久久| hitomi一区二区三区精品| 99久久免费精品| 欧美亚日韩国产aⅴ精品中极品| 在线观看视频欧美| 777亚洲妇女| 久久久一区二区| 国产精品国产馆在线真实露脸 | 粉嫩13p一区二区三区| 99精品视频一区二区三区| 91麻豆福利精品推荐| 欧美少妇一区二区| 精品国产乱码久久久久久蜜臀| 国产日韩v精品一区二区| 亚洲天堂免费看| 日日摸夜夜添夜夜添亚洲女人| 韩国欧美国产1区| 99国产精品国产精品久久| 欧美日韩一区小说| 26uuu国产日韩综合| 国产精品色婷婷久久58| 亚洲一区二区美女| 精品一区二区免费视频| 99在线精品观看| 69堂国产成人免费视频| 亚洲国产精品传媒在线观看| 亚洲国产视频直播| 国产精品亚洲午夜一区二区三区| 97精品超碰一区二区三区| 91精品久久久久久久91蜜桃| 久久久99精品免费观看| 一级特黄大欧美久久久| 久热成人在线视频| 在线看一区二区| 精品国产91九色蝌蚪| 亚洲日本在线天堂| 国产一区二区三区在线观看免费 | 美腿丝袜亚洲一区| 99精品欧美一区二区蜜桃免费| 欧美一区午夜视频在线观看 | 中文字幕日本不卡| 美腿丝袜亚洲一区| 日本高清不卡在线观看| 欧美videofree性高清杂交| 亚洲男人电影天堂| 国产成人精品亚洲777人妖| 欧美日韩一级大片网址| 国产精品美日韩| 激情小说欧美图片| 制服丝袜亚洲网站| 亚洲免费观看在线观看| 国产精品18久久久久久久久| 欧美日韩免费不卡视频一区二区三区| 久久久国产精品午夜一区ai换脸| 午夜婷婷国产麻豆精品| 99精品视频一区| 国产精品每日更新| 久久99国产乱子伦精品免费| 6080午夜不卡| 亚洲高清视频在线| 91成人在线观看喷潮| 国产精品麻豆久久久| 国产福利一区二区| 久久久久久久电影| 国产一区二区三区电影在线观看 | 亚洲国产精品二十页| 国产在线精品不卡| 日韩午夜av一区| 视频在线观看一区二区三区| 欧美最新大片在线看| 亚洲精品老司机| 色婷婷综合久久久久中文一区二区| 中文字幕不卡一区| 国产·精品毛片| 国产精品理论在线观看| 成人av影院在线| 中文字幕在线免费不卡| 成人h精品动漫一区二区三区| 国产亚洲欧美中文| 国产不卡在线视频| 欧美国产亚洲另类动漫| 成人性生交大片免费看在线播放 | 国产乱人伦偷精品视频不卡| 欧美一级黄色片| 麻豆久久一区二区| 精品播放一区二区| 国产福利一区二区三区视频 | 中文字幕乱码久久午夜不卡| 国产高清一区日本| 国产精品高潮呻吟| 91美女视频网站| 亚洲愉拍自拍另类高清精品| 在线视频一区二区三区| 午夜欧美视频在线观看| 日韩精品影音先锋| 国产成人高清在线| 亚洲人成人一区二区在线观看| 欧洲国内综合视频| 日韩二区三区四区| 久久久.com| 色女孩综合影院| 日韩国产高清影视| 欧美精品一区二区三| 成人性生交大片免费看视频在线 | 国产精品色眯眯| 欧美中文字幕一区二区三区| 日韩综合在线视频| 久久亚洲精品小早川怜子| jiyouzz国产精品久久| 亚洲主播在线观看| 亚洲精品一区二区精华| 成人动漫av在线| 天天av天天翘天天综合网 | 亚洲影院久久精品| 日韩精品一区二区三区视频在线观看| 国产精品资源网站| 亚洲综合精品自拍| 国产午夜精品美女毛片视频|