Class SearchUtil

java.lang.Object
com.openhtmltopdf.util.SearchUtil

public class SearchUtil extends Object
  • Constructor Details

    • SearchUtil

      public SearchUtil()
  • Method Details

    • intBinarySearch

      public static <T> int intBinarySearch(SearchUtil.IntComparator comparator, int startIndex, int count)
      Method to search over any kind of sorted range. The comparator is called with an int following the binary search algorithm until a match or the range is exhausted.
      Returns:
      the matching value or -1 if we exhausted the range.