View Javadoc
1   /**
2    * 
3    */
4   package siouxsie.mvc.test;
5   
6   import java.util.Collections;
7   import java.util.HashMap;
8   import java.util.Map;
9   
10  import siouxsie.mvc.IScreen;
11  
12  /**
13   * 
14   * @author Arnaud Cogoluegnes
15   * @version $Id: LaunchConfiguration.java 143 2008-06-03 20:37:37Z acogo $
16   */
17  public class LaunchConfiguration {
18  
19  	/** the screen class to test */
20  	private Class<? extends IScreen> clazz;
21  	
22  	/** context (for the value stack) */
23  	private Map<Object, Object> context = new HashMap<Object, Object>();
24  	
25  	private String desc;
26  	
27  	public LaunchConfiguration(String desc,Class<? extends IScreen> cl) {
28  		this.clazz = cl;
29  		this.desc = desc;
30  	}
31  	
32  	public LaunchConfiguration put(String key,Object value) {
33  		context.put(key, value);
34  		return this;
35  	}
36  	
37  	public Map<Object, Object> getContext() {
38  		return Collections.unmodifiableMap(context);
39  	}
40  	
41  	public Class<? extends IScreen> getScreenClass() {
42  		return this.clazz;
43  	}
44  	
45  	public String toString() {
46  		return desc;
47  	}
48  	
49  }