fr.dyade.aaa.util
Class Arrays
public class Arrays
extends java.lang.Object
This class contains various methods for sorting and searching int arrays.
static int | binarySearch(short[] a, int key) - Searches the specified array of ints for the specified value using the
binary search algorithm.
|
static boolean | equals(short[] a, a2[] ) - Returns true if the two specified arrays of shorts are
equal to one another.
|
static void | sort(short[] a) - Sorts the specified array of ints into ascending numerical order.
|
static void | sort(short[] a, int fromIndex, int toIndex) - Sorts the specified range of the specified array of ints into
ascending numerical order.
|
binarySearch
public static int binarySearch(short[] a,
int key)
Searches the specified array of ints for the specified value using the
binary search algorithm. The array must be sorted (as
by the sort method, above) prior to making this call.
equals
public static boolean equals(short[] a,
a2[] )
Returns true if the two specified arrays of shorts are
equal to one another.
sort
public static void sort(short[] a)
Sorts the specified array of ints into ascending numerical order.
The sorting algorithm is a tuned quicksort.
a
- the array to be sorted.
sort
public static void sort(short[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the specified array of ints into
ascending numerical order.
Copyright B) 2004 Scalagent - All rights reserved