PublicSuffixMatcher.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:purecloud-iot 作者:
/**
 * @since 4.5
 */
public PublicSuffixMatcher(final Collection<PublicSuffixList> lists) {
    Args.notNull(lists,  "Domain suffix lists");
    this.rules = new ConcurrentHashMap<String, DomainType>();
    this.exceptions = new ConcurrentHashMap<String, DomainType>();
    for (final PublicSuffixList list: lists) {
        final DomainType domainType = list.getType();
        final List<String> rules = list.getRules();
        for (final String rule: rules) {
            this.rules.put(rule, domainType);
        }
        final List<String> exceptions = list.getExceptions();
        if (exceptions != null) {
            for (final String exception: exceptions) {
                this.exceptions.put(exception, domainType);
            }
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号