| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> int | Returns: the matching value or -1 if we exhausted the range.Method to search over any kind of sorted range. |
| SearchUtil | back to summary |
|---|---|
| public SearchUtil() | |
| intBinarySearch | back to summary |
|---|---|
| public static <T> int intBinarySearch(SearchUtil. Method to search over any kind of sorted range. The comparator is called with an int following the binary search algorithm until a match or the range is exhausted.
| |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(int index)
Return 0 for a match, -1 (too low) if we should continue searching after the index and +1 (too high) if we should continue searching before the index. |
| compare | back to summary |
|---|---|
| public int compare(int index) Return 0 for a match, -1 (too low) if we should continue searching after the index and +1 (too high) if we should continue searching before the index. | |