Class BinarySearch.ObjRange

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

public static final class BinarySearch.ObjRange extends Object
Binary searches over a range of objects.
  • Method Details

    • find

      public <T> T find(T from, T to, BinaryOperator<T> midpoint, Predicate<T> test)
      Get the lowest index within the given range that satisfies the given test.
      Type Parameters:
      T - the index type
      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

      public static BinarySearch.ObjRange.InCollection inCollection()
      Returns search operations over a collection.
      Returns:
      search operations over a collection