Code example for HashMap

Methods: put

0
        commands.put("whois", new WhoisHandler());
        commands.put("msg", new MsgHandler());
        commands.put("quote", new RawHandler());
        commands.put("amsg", new AMsgHandler());
 
        aliases = new HashMap<String, String>();
 
        // Aliases 
        aliases.put("j","join");
        aliases.put("q", "query");
        aliases.put("h", "help");
        aliases.put("raw", "quote");
        aliases.put("w", "whois");
    } 
 
    /** 
     * Get the global CommandParser instance 
     *  
     * @return 
     */ 
    public static synchronized CommandParser getInstance()