java.lang.Object
io.smallrye.common.search.BinarySearch.ObjRange
- Enclosing class:
BinarySearch
Binary searches over a range of objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSearch operations within a collection. -
Method Summary
Modifier and TypeMethodDescription<T> Tfind(T from, T to, BinaryOperator<T> midpoint, Predicate<T> test) Get the lowest index within the given range that satisfies the given test.Returns search operations over a collection.
-
Method Details
-
find
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 benull)test- the test (must not benull)- Returns:
- the lowest index within the range which satisfies the test, or
toif no values satisfy the test within the range
-
inCollection
Returns search operations over a collection.- Returns:
- search operations over a collection
-