void (CredentialsType credentialsType) { for (Map.Entry<CredentialsType, TypeHandler> type2handler : myCredentialsType2Handler.entrySet()) { if (type2handler.getKey() == credentialsType) { type2handler.getValue().getRadioButton().setSelected(true); break; } } radioSelected(true); }