|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weiss.util.Arrays
Instanceless class that contains static methods to manipulate arrays.
Method Summary | |
static int |
binarySearch(java.lang.Object[] arr,
java.lang.Object x)
Performs a search on sorted array arr. |
static int |
binarySearch(java.lang.Object[] arr,
java.lang.Object x,
Comparator 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 int binarySearch(java.lang.Object[] arr, java.lang.Object x)
arr
- the array to search.x
- the object to search for.java.lang.ClassCastException
- if comparsions cannot be performed.public static int binarySearch(java.lang.Object[] arr, java.lang.Object x, Comparator 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |