|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectweiss.util.Arrays
public class Arrays
Instanceless class that contains static methods to manipulate arrays.
| Method Summary | ||
|---|---|---|
static
|
binarySearch(AnyType[] arr,
AnyType x)
Performs a search on sorted array arr. |
|
static
|
binarySearch(AnyType[] arr,
AnyType x,
Comparator<? super AnyType> cmp)
Performs a search on sorted array arr using a comparator. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <AnyType extends java.lang.Comparable<? super AnyType>> int binarySearch(AnyType[] arr,
AnyType x)
arr - the array to search.x - the object to search for.
java.lang.ClassCastException - if comparsions cannot be performed.
public static <AnyType> int binarySearch(AnyType[] arr,
AnyType x,
Comparator<? super AnyType> cmp)
arr - the array to search.x - the object to search for.cmp - the comparator.
java.lang.ClassCastException - if comparsions cannot be performed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||