public void test() {
Map<String, List<String>> tagNamesByTldName = new HashMap<String, List<String>>();
for(String tldPath : tldsByPath.keySet()) {
Tld tld = tldsByPath.get(tldPath);
for(Tag tag : tld.getTags()) {
List<String> tagNames = tagNamesByTldName.get(tld.getName());
if(tagNames == null) {
tagNames = new LinkedList<String>();
tagNamesByTldName.put(tld.getName(), tagNames);
}
if(tagNames.contains(tag.getName()))
fail("Tag '" + tag.getName() + "' occurs in tag library '"
+ tld.getName() + "' more than once");
tagNames.add(tag.getName());
}
}
}