Code example for Dictionary

Methods: put

0
 
public class ManageActivity { 
	public static Dictionary<String, Activity> allActiviy=new Hashtable<String,Activity>();
	 
	public static void addActiviy(String name,Activity activity){
		allActiviy.put(name, activity);
	} 
	 
	public static Activity getActivity(String name){
		return (Activity)allActiviy.get(name);
	} 
	public static void ColseallActivity(){ 
		try 
		{ 
		 Enumeration<String> en = allActiviy.keys();
		 while(en.hasMoreElements()){
    	    	 
               allActiviy.get((String) en.nextElement()).finish();
//               allActiviy.remove((String) en.nextElement()); 
              
              }