Class BinarySearch.IntRange.InCollection

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

public static final class BinarySearch.IntRange.InCollection extends Object
Search operations within a collection.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Search operations within a collection which operate on an extracted key.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns search operations which operate by an extracted key.
    <C> int
    find(C collection, int from, int to, io.smallrye.common.function.ObjIntPredicate<C> test)
    Get the lowest index within the given range that satisfies the given test.
    <L extends List<?>>
    int
    find(L list, io.smallrye.common.function.ObjIntPredicate<L> test)
    Get the lowest index within the given random-access list that satisfies the given test.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • find

      public <C> int find(C collection, int from, int to, io.smallrye.common.function.ObjIntPredicate<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 be null)
      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
    • find

      public <L extends List<?>> int find(L list, io.smallrye.common.function.ObjIntPredicate<L> test)
      Get the lowest index within the given random-access list that satisfies the given test.
      Type Parameters:
      L - the list type
      Parameters:
      list - the list object (must not be null)
      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
    • byKey

      Returns search operations which operate by an extracted key.
      Returns:
      search operations which operate by an extracted key