Class BlockfilePointSearchTool
java.lang.Object
io.datarouter.bytes.blockfile.index.BlockfilePointSearchTool
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C,I> int binarySearch(int size, Function<Integer, I> extractFn, Function<I, Integer> compareFn, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) static <C,I> Optional <I> find(int size, Function<Integer, I> extractFn, Function<I, Integer> compareFn, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) static <C,I, K> Optional <I> find(C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) static <C,I> Optional <I> static <C,I, K> Optional <I> findAny(C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) static <I,K> Optional <I> findAnyInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey) static <C,I> Optional <I> static <C,I, K> Optional <I> findFirst(C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) static <I,K> Optional <I> findFirstInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey) static <I,K> Optional <I> findInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) static <C,I> Optional <I> static <C,I, K> Optional <I> findLast(C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) static <I,K> Optional <I> findLastInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey)
-
Constructor Details
-
BlockfilePointSearchTool
public BlockfilePointSearchTool()
-
-
Method Details
-
binarySearch
public static <C,I> int binarySearch(int size, Function<Integer, I> extractFn, Function<I, Integer> compareFn, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) - Type Parameters:
C- sorted items accessible by integer indexI- a single item
-
find
-
find
public static <C,I, Optional<I> findK> (C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) -
findInList
public static <I,K> Optional<I> findInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey, BlockfilePointSearchTool.BlockfileBinarySearchType searchType) -
findAny
-
findAny
public static <C,I, Optional<I> findAnyK> (C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) -
findAnyInList
public static <I,K> Optional<I> findAnyInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey) -
findFirst
-
findFirst
public static <C,I, Optional<I> findFirstK> (C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) -
findFirstInList
public static <I,K> Optional<I> findFirstInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey) -
findLast
-
findLast
public static <C,I, Optional<I> findLastK> (C items, int size, BiFunction<C, Integer, I> extractBiFn, BiFunction<I, K, Integer> compareBiFn, K searchKey) -
findLastInList
public static <I,K> Optional<I> findLastInList(List<I> items, BiFunction<I, K, Integer> compareBiFn, K searchKey)
-