Package technology.tabula
Class Utils
java.lang.Object
technology.tabula.Utils
public class Utils extends Object
- Author:
- manuel
-
Field Summary
Fields Modifier and Type Field Description protected static booleanuseQuickSort -
Constructor Summary
Constructors Constructor Description Utils() -
Method Summary
Modifier and Type Method Description static Rectanglebounds(Collection<? extends Shape> shapes)static booleanfeq(double f1, double f2)static booleanisNumeric(CharSequence cs)static Stringjoin(String glue, String... s)static 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)static List<Integer>parsePagesOption(String pagesSpec)static List<Integer>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>>
voidsort(List<T> list)Wrap 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 <T> List<List<T>>transpose(List<List<T>> table)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
-