Module io.smallrye.common.search
Package io.smallrye.common.search
Class BinarySearch.LongRange.CustomMidpoint
java.lang.Object
io.smallrye.common.search.BinarySearch.LongRange.CustomMidpoint
- Enclosing class:
BinarySearch.LongRange
Search operations which apply over an
long range using a custom midpoint function.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSearch operations within a collection using a custom midpoint function. -
Method Summary
Modifier and TypeMethodDescriptionlongfind(long from, long to, LongBinaryOperator midpoint, LongPredicate test) Get the lowest index within the given range that satisfies the given test.Returns search operations over a collection using a custom midpoint function.
-
Method Details
-
find
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 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 using a custom midpoint function.- Returns:
- search operations over a collection using a custom midpoint function
-