public class ArrayBinarySearch<T> extends Object implements ArraySearch<T>
ArrayAlgorithm.Util| Constructor and Description |
|---|
ArrayBinarySearch() |
| Modifier and Type | Method and Description |
|---|---|
Integer |
apply(T[] ts,
Integer from,
Integer to,
T key,
Comparator<T> comp)
Search array region specified by
from and to using
the predicate specified |
static void |
main(String[] args) |
public Integer apply(T[] ts, Integer from, Integer to, T key, Comparator<T> comp)
ArraySearchfrom and to using
the predicate specifiedapply in interface Osgl.Func5<T[],Integer,Integer,T,Comparator<T>,Integer>apply in interface ArraySearch<T>ts - the sorted array to be searchedfrom - the from indexto - the to indexkey - the key to search the arraycomp - the comparator functionpublic static void main(String[] args)
Copyright © 2017. All Rights Reserved.