/** * Returns true if the specified <code>String</code> matches any * widely used "local" domains (localhost or localdomain). Leading dots are * ignored if present. The search is case-insensitive. * @param lTld the parameter to check for local TLD status, not null * @return true if the parameter is an local TLD */ public boolean isValidLocalTld(String lTld) { final String key = chompLeadingDot(unicodeToASCII(lTld).toLowerCase(Locale.ENGLISH)); return arrayContains(LOCAL_TLDS, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined infrastructure top-level domain. Leading dots are * ignored if present. The search is case-insensitive. * @param iTld the parameter to check for infrastructure TLD status, not null * @return true if the parameter is an infrastructure TLD */ public boolean isValidInfrastructureTld(String iTld) { final String key = chompLeadingDot(unicodeToASCII(iTld).toLowerCase(Locale.ENGLISH)); return arrayContains(INFRASTRUCTURE_TLDS, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined generic top-level domain. Leading dots are ignored * if present. The search is case-insensitive. * @param gTld the parameter to check for generic TLD status, not null * @return true if the parameter is a generic TLD */ public boolean isValidGenericTld(String gTld) { final String key = chompLeadingDot(unicodeToASCII(gTld).toLowerCase(Locale.ENGLISH)); return (arrayContains(GENERIC_TLDS, key) || arrayContains(genericTLDsPlus, key)) && !arrayContains(genericTLDsMinus, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined country code top-level domain. Leading dots are * ignored if present. The search is case-insensitive. * @param ccTld the parameter to check for country code TLD status, not null * @return true if the parameter is a country code TLD */ public boolean isValidCountryCodeTld(String ccTld) { final String key = chompLeadingDot(unicodeToASCII(ccTld).toLowerCase(Locale.ENGLISH)); return (arrayContains(COUNTRY_CODE_TLDS, key) || arrayContains(countryCodeTLDsPlus, key)) && !arrayContains(countryCodeTLDsMinus, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined infrastructure top-level domain. Leading dots are * ignored if present. The search is case-insensitive. * @param iTld the parameter to check for infrastructure TLD status, not null * @return true if the parameter is an infrastructure TLD */ public boolean isValidInfrastructureTld(String iTld) { final String key = chompLeadingDot(unicodeToASCII(iTld).toLowerCase(Locale.ENGLISH)); return arrayContains(INFRASTRUCTURE_TLDS, key); }
/** * Returns true if the specified <code>String</code> matches any * widely used "local" domains (localhost or localdomain). Leading dots are * ignored if present. The search is case-insensitive. * @param lTld the parameter to check for local TLD status, not null * @return true if the parameter is an local TLD */ public boolean isValidLocalTld(String lTld) { final String key = chompLeadingDot(unicodeToASCII(lTld).toLowerCase(Locale.ENGLISH)); return arrayContains(LOCAL_TLDS, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined country code top-level domain. Leading dots are * ignored if present. The search is case-insensitive. * @param ccTld the parameter to check for country code TLD status, not null * @return true if the parameter is a country code TLD */ public boolean isValidCountryCodeTld(String ccTld) { final String key = chompLeadingDot(unicodeToASCII(ccTld).toLowerCase(Locale.ENGLISH)); return (arrayContains(COUNTRY_CODE_TLDS, key) || arrayContains(countryCodeTLDsPlus, key)) && !arrayContains(countryCodeTLDsMinus, key); }
/** * Returns true if the specified <code>String</code> matches any * IANA-defined generic top-level domain. Leading dots are ignored * if present. The search is case-insensitive. * @param gTld the parameter to check for generic TLD status, not null * @return true if the parameter is a generic TLD */ public boolean isValidGenericTld(String gTld) { final String key = chompLeadingDot(unicodeToASCII(gTld).toLowerCase(Locale.ENGLISH)); return (arrayContains(GENERIC_TLDS, key) || arrayContains(genericTLDsPlus, key)) && !arrayContains(genericTLDsMinus, key); }