Class BinarySearch.ObjRange.InCollection

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

public static final class BinarySearch.ObjRange.InCollection extends Object
Search operations within a collection.
  • Method Details

    • find

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