Class BinarySearch.LongRange.CustomMidpoint.InCollection

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

public static final class BinarySearch.LongRange.CustomMidpoint.InCollection extends Object
Search operations within a collection using a custom midpoint function.
  • Method Details

    • find

      public <C> long find(C collection, long from, long to, LongBinaryOperator midpoint, io.smallrye.common.function.ObjLongPredicate<C> test)
      Get the lowest index within the given range that satisfies the given test.
      Type Parameters:
      C - the collection type
      Parameters:
      collection - the collection object (must not be null)
      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
    • byKey

      Returns search operations which operate by an extracted key.
      Returns:
      search operations which operate by an extracted key