Class BinarySearch.LongRange.CustomMidpoint

java.lang.Object
io.smallrye.common.search.BinarySearch.LongRange.CustomMidpoint
Enclosing class:
BinarySearch.LongRange

public static final class BinarySearch.LongRange.CustomMidpoint extends Object
Search operations which apply over an long range using a custom midpoint function.
  • Method Details

    • find

      public long find(long from, long to, LongBinaryOperator midpoint, LongPredicate test)
      Get the lowest index within the given range that satisfies the given test.
      Parameters:
      from - the low end of the range (inclusive)
      to - the high end of the range (exclusive)
      midpoint - the midpoint function (must not be null)
      test - the test (must not be null)
      Returns:
      the lowest index within the range which satisfies the test, or to if no values satisfy the test within the range
    • inCollection

      Returns search operations over a collection using a custom midpoint function.
      Returns:
      search operations over a collection using a custom midpoint function