Code example for Hashtable

0
 */ 
 
public class MockHttpRequest implements HttpRequest {
	Hashtable<String, String> headers = new Hashtable<String, String>();
 
	Hashtable<String, String> params = new Hashtable<String, String>();
 
	public void setHeader(String header, String value) {
		headers.put(header, value);
	} 
 
	public void setParameter(String parameter, String value) {
		params.put(parameter, value);
	} 
 
	public String getHeader(String name) {
		return headers.get(name);
	} 
 
	public String getParameter(String name) {
		return params.get(name);