Module io.smallrye.common.search
Package io.smallrye.common.search
Class BinarySearch.LongRange.CustomMidpoint.InCollection
java.lang.Object
io.smallrye.common.search.BinarySearch.LongRange.CustomMidpoint.InCollection
- Enclosing class:
BinarySearch.LongRange.CustomMidpoint
Search operations within a collection using a custom midpoint function.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSearch operations within a collection which operate on an extracted key using a custom midpoint function. -
Method Summary
Modifier and TypeMethodDescriptionbyKey()Returns search operations which operate by an extracted key.<C> longfind(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.
-
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 benull)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
-
byKey
Returns search operations which operate by an extracted key.- Returns:
- search operations which operate by an extracted key
-