Package technology.tabula
Class Utils
java.lang.Object
technology.tabula.Utils
- Author:
- manuel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Rectanglebounds(Collection<? extends Shape> shapes) static booleanfeq(double f1, double f2) static booleanstatic Stringstatic booleanoverlap(double y1, double height1, double y2, double height2) static booleanoverlap(double y1, double height1, double y2, double height2, double variance) static BufferedImagepageConvertToImage(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, int dpi, org.apache.pdfbox.rendering.ImageType imageType) static BufferedImagepageConvertToImage(org.apache.pdfbox.pdmodel.PDPage page, int dpi, org.apache.pdfbox.rendering.ImageType imageType) parsePagesOption(String pagesSpec) range(int begin, int end) static floatround(double d, int decimalPlace) static voidsnapPoints(List<? extends Line2D.Float> rulings, float xThreshold, float yThreshold) static <T extends Comparable<? super T>>
voidWrap Collections.sort so we can fallback to a non-stable quicksort if we're running on JDK7+static <T> voidsort(List<T> list, Comparator<? super T> comparator) static booleanwithin(double first, double second, double variance)
-
Field Details
-
useQuickSort
protected static boolean useQuickSort
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
within
public static boolean within(double first, double second, double variance) -
overlap
public static boolean overlap(double y1, double height1, double y2, double height2, double variance) -
overlap
public static boolean overlap(double y1, double height1, double y2, double height2) -
feq
public static boolean feq(double f1, double f2) -
round
public static float round(double d, int decimalPlace) -
bounds
-
range
-
isNumeric
-
join
-
transpose
-
sort
Wrap Collections.sort so we can fallback to a non-stable quicksort if we're running on JDK7+ -
sort
-
parsePagesOption
public static List<Integer> parsePagesOption(String pagesSpec) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
snapPoints
public static void snapPoints(List<? extends Line2D.Float> rulings, float xThreshold, float yThreshold) -
pageConvertToImage
public static BufferedImage pageConvertToImage(org.apache.pdfbox.pdmodel.PDPage page, int dpi, org.apache.pdfbox.rendering.ImageType imageType) throws IOException - Throws:
IOException
-
pageConvertToImage
public static BufferedImage pageConvertToImage(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, int dpi, org.apache.pdfbox.rendering.ImageType imageType) throws IOException - Throws:
IOException
-