public ParserPolicy(int maxParseDuration,
Set<String> linkTags,
Set<String> linkAttributeTypes) {
if ((maxParseDuration <= 0) && (maxParseDuration != NO_MAX_PARSE_DURATION)) {
throw new InvalidParameterException("maxParseDuration must be > 0: " + maxParseDuration);
}
// Catch common error of specifying maxParseDuration in seconds versus milliseconds
if (maxParseDuration < 100) {
throw new InvalidParameterException("maxParseDuration must be milliseconds, not seconds: " + maxParseDuration);
}
_maxParseDuration = maxParseDuration;
_linkAttributeTypes = linkAttributeTypes;
_linkTags = linkTags;