Class BinarySearch.LongRange

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

public static final class BinarySearch.LongRange extends Object
Search operations which apply over an long range.
  • Method Details

    • find

      public long find(long from, long to, LongPredicate test)
      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)
      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
    • signed

      public BinarySearch.LongRange signed()
      Returns search operations over a signed-integer space.
      Returns:
      search operations over a signed-integer space
    • unsigned

      public BinarySearch.LongRange unsigned()
      Returns search operations over an unsigned-integer space.
      Returns:
      search operations over an unsigned-integer space
    • customMidpoint

      public BinarySearch.LongRange.CustomMidpoint customMidpoint()
      Returns search operations over a space defined by a custom midpoint function.
      Returns:
      search operations over a space defined by a custom midpoint function
    • inCollection

      public BinarySearch.LongRange.InCollection inCollection()
      Returns search operations over a collection using the current signedness rules for the midpoint function.
      Returns:
      search operations over a collection using the current signedness rules for the midpoint function