public boolean matches(final String domain, final DomainType expectedType) {
        if (domain == null) {
            return false;
        }
        final String domainRoot = getDomainRoot(
                domain.startsWith(".") ? domain.substring(1) : domain, expectedType);
        return domainRoot == null;
    }
Tests whether the given domain matches any of entry from the public suffix list.

@param domain
@param expectedType expected domain type or {@code null} if any.
@return {@code true} if the given domain matches any of the public suffixes.

@since 4.5
httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java