|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.Arrays
public final class Arrays
Arrays is used for sorting array elements. When no comparator is specified, the default toString() comparator is used. That comparator just compares the string values of the elements using the toString() method.
Copyright (c) Enough Software 2006 - 2008
| Method Summary | |
|---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
static boolean |
equals(java.lang.Object array1,
java.lang.Object array2)
Compares two given array on equality. |
static void |
iQuick(int[] array,
int elements)
|
static void |
quicksort(java.lang.Object[] obj)
|
static void |
quicksort(java.lang.Object[] obj,
int elements,
Comparator comparator)
|
static void |
shellSort(java.lang.Object[] array)
Sorts the given array using the shell sorting algorithm and the default toString() comparator. |
static void |
shellSort(java.lang.Object[] array,
Comparator comparator)
Sorts the given array using the shell sorting algorithm. |
static void |
sort(java.lang.Object[] obj)
Sorts the objects using the standard shell sort implementation and the toString() comparator. |
static void |
sort(java.lang.Object[] obj,
Comparator comparator)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface Comparatorpublic static void sort(java.lang.Object[] obj)
obj - the array of objects that is sortedpublic static void shellSort(java.lang.Object[] array)
array - the array elements that should be sorted
public static void shellSort(java.lang.Object[] array,
Comparator comparator)
array - the array elements that should be sortedcomparator - the comparator used for comparing the entriespublic static void quicksort(java.lang.Object[] obj)
public static void iQuick(int[] array,
int elements)
public static void quicksort(java.lang.Object[] obj,
int elements,
Comparator comparator)
public static void sort(java.lang.Object[] obj,
Comparator comparator)
public static boolean equals(java.lang.Object array1,
java.lang.Object array2)
array1 - the first arrayarray2 - the second array
java.lang.ClassCastException - when the arrays do have different types and the first one has a primitive type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||