Class BinarySearch.IntRange

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

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

    • find

      public int find(int from, int to, IntPredicate 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.IntRange signed()
      Returns search operations over a signed-integer space.
      Returns:
      search operations over a signed-integer space
    • unsigned

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

      public BinarySearch.IntRange.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.IntRange.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