org.jsoup.parser.ParseErrorList Maven / Gradle / Ivy
package org.jsoup.parser;
import java.util.ArrayList;
/**
* A container for ParseErrors.
*
* @author Jonathan Hedley
*/
public class ParseErrorList extends ArrayList{
private static final int INITIAL_CAPACITY = 16;
private final int maxSize;
ParseErrorList(int initialCapacity, int maxSize) {
super(initialCapacity);
this.maxSize = maxSize;
}
boolean canAddError() {
return size() < maxSize;
}
int getMaxSize() {
return maxSize;
}
public static ParseErrorList noTracking() {
return new ParseErrorList(0, 0);
}
public static ParseErrorList tracking(int maxSize) {
return new ParseErrorList(INITIAL_CAPACITY, maxSize);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy