Class Utils

java.lang.Object
technology.tabula.Utils

public class Utils extends Object
Author:
manuel
  • 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

      public static Rectangle bounds(Collection<? extends Shape> shapes)
    • range

      public static List<Integer> range(int begin, int end)
    • isNumeric

      public static boolean isNumeric(CharSequence cs)
    • join

      public static String join(String glue, String... s)
    • transpose

      public static <T> List<List<T>> transpose(List<List<T>> table)
    • sort

      public static <T extends Comparable<? super T>> void sort(List<T> list)
      Wrap Collections.sort so we can fallback to a non-stable quicksort if we're running on JDK7+
    • sort

      public static <T> void sort(List<T> list, Comparator<? super T> comparator)
    • 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