public class SortableDataUtils extends java.lang.Object
Constructor and Description |
---|
SortableDataUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
binarySearch(ISortableData data,
int elementIndex)
Performs a binary search for the element at the given index.
|
static void |
sort(ISortableData data)
Sorts the data in place using a randomized quick sort algorithm.
|
public SortableDataUtils()
public static int binarySearch(ISortableData data, int elementIndex)
ISortableData.size()
inclusive. The given element index may be
larger than ISortableData.size()
, i.e. the element does not have
to be in the list.public static void sort(ISortableData data)