Code example for Map

Methods: containsKey, get

0
            } 
        } 
    } 
 
    public boolean containsAccountType(String accountType) {
        return mTypeToAuthDescription.containsKey(accountType);
    } 
 
    public AuthenticatorDescription getAccountTypeDescription(String accountType) {
        return mTypeToAuthDescription.get(accountType);
    } 
 
    public boolean hasAccountPreferences(final String accountType) {
        if (containsAccountType(accountType)) {
            AuthenticatorDescription desc = getAccountTypeDescription(accountType);
            if (desc != null && desc.accountPreferencesId != 0) {
                return true; 
            } 
        } 
        return false; 
    }