/**
 * @(#)HashVector.java
 * Copyright 2001 Nomura Research Institute, LTD. All rights reserved.
 * RIDUAL : ScanProperty
 * @author  Intelligent Technology Inc.
 * @version 1.00 2002/09/02
 */
package jp.co.nri.rid.web;

/* JAVA */
import	java.util.*;

/**
 * ハッシュ形式でVectorを管理するクラス。
 */
public class HashVector{
	private Hashtable	myHash;
//	private Vector		myKeys;
	
	public	HashVector(){
		myHash	= new Hashtable();
//		myKeys	= new Vector();
	}
	
	public void add(Object key ,Object object){
		Vector vector = (Vector)myHash.get(key);
		if(null==vector){
			vector = new Vector();
			set(key ,vector);
		}
		
		vector.add(object);
	}
	
	public void set(Object key ,Vector vector){
//		synchronized(myKeys){
//			synchronized(myHash){
//				Object obj = myHash.get(key);
//				if(null==obj)	myKeys.add(key);
				myHash.put(key ,vector);
//			}
//		}
		
//		return vector;
	}
	
	public	Vector	get(Object key){	return (Vector)myHash.get(key);	}
	public	int		size(){				return myHash.size();			}
//	public Vector getKeys(){ return myKeys; }
}
