Code example for ConcurrentHashMap

Methods: remove

0
	public UserAccount getAccountWithAlias(String alias) { 
		return accountAliases.get(alias); 
	} 
	 
	public UserAccount removeAccount(String name) { 
		UserAccount account = accounts.remove(name); 
		if (account != null && account.getAccountAlias() != null) { 
			accountAliases.remove(account.getAccountAlias()); 
		} 
		return account; 
	} 
	 
}