Searches the specified naturally ordered list for the specified object using the binary search algorithm. Equivalent to #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior) using Ordering#natural.
(
List<? extends E> list,
E e,
KeyPresentBehavior presentBehavior,
KeyAbsentBehavior absentBehavior)
| 201 | |
| 202 | |
| 203 | public static <E extends Comparable> int binarySearch( |
| 204 | List<? extends E> list, |
| 205 | E e, |
| 206 | KeyPresentBehavior presentBehavior, |
| 207 | KeyAbsentBehavior absentBehavior) { |
| 208 | checkNotNull(e); |
| 209 | return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * Binary searches the list for the specified key, using the specified key function. |
no test coverage detected