Code example for Hashtable

Methods: getremove

     * @param name Name of the context 
     * @param token Security token 
    public static void unsetSecurityToken(Object name, Object token) {
        if (checkSecurityToken(name, token)) {
     * Check a submitted security token. The submitted token must be equal to 
     * the token present in the repository. If no token is present for the  
     * context, then returns true. 
     * @param name Name of the context 
     * @param token Submitted security token 
    public static boolean checkSecurityToken 
        (Object name, Object token) {
        Object refToken = securityTokens.get(name);
        if (refToken == null)
            return (true); 
        if ((refToken != null) && (refToken.equals(token)))
            return (true); 
        return (false); 
Experience pair programming with AI  Get Codota for Java