public static AdminOnlyDomainConfigPolicy getPolicy(String stringForm) { AdminOnlyDomainConfigPolicy result = POLICY_MAP.get(stringForm.toUpperCase(Locale.ENGLISH)); if (result == null) { result = AdminOnlyDomainConfigPolicy.valueOf(stringForm); } return result; }
static { for (AdminOnlyDomainConfigPolicy policy : AdminOnlyDomainConfigPolicy.values()) { POLICY_MAP.put(policy.toString().toUpperCase(Locale.ENGLISH), policy); } }