Code example for HashMap

Methods: put

import javax.servlet.http.HttpServletRequest; 
public class AnonymousSessionService implements ISessionService { 
	HashMap<String, Object> session = new HashMap<String, Object>();
	public AnonymousSessionService() { 
		session.put("username", "anonymous");
		session.put("sessionid", UUID.randomUUID().toString());
		session.put("roles", new ArrayList<String>());
	public Map<String, Object> login(HttpServletRequest req, String username,
			String password) {
		// TODO Auto-generated method stub 
		return null; 
Connect your IDE to all the code out there  Get Codota for Java