/** * @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); } } } }
/** * @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 (PublicSuffixList list: lists) { final DomainType domainType = list.getType(); final List<String> rules = list.getRules(); for (String rule: rules) { this.rules.put(rule, domainType); } final List<String> exceptions = list.getExceptions(); if (exceptions != null) { for (String exception: exceptions) { this.exceptions.put(exception, domainType); } } } }
/** * @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); } } } }
/** * @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); } } } }
/** * @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); } } } }