org.jsoup.parser.ParseErrorList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of html2pdf Show documentation
Show all versions of html2pdf Show documentation
pdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts
them to PDF.
package org.jsoup.parser;
import java.util.ArrayList;
/**
* A container for ParseErrors.
*
* @author Jonathan Hedley
*/
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;
}
static ParseErrorList noTracking() {
return new ParseErrorList(0, 0);
}
static ParseErrorList tracking(int maxSize) {
return new ParseErrorList(INITIAL_CAPACITY, maxSize);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy