Java Utililty Methods Array Sort

List of utility methods to do Array Sort

Description

The list of methods to do Array Sort are organized into topic(s).

Method

voidsort(Object[] array_, boolean accendingOrder_)
sort
String[] ids_ = new String[array_.length];
for (int i = 0; i < array_.length; i++)
    ids_[i] = array_[i].toString();
for (;;) {
    boolean changed_ = false;
    for (int i = 0; i < array_.length - 1; i++) {
        String s = ids_[i];
        String t = ids_[i + 1];
...
voidsort(String a[])
sort
for (int i = 0; i < a.length - 1; i++) {
    for (int j = i + 1; j < a.length; j++) {
        if (a[j].compareTo(a[i]) < 0) {
            String temp = a[i];
            a[i] = a[j];
            a[j] = temp;
voidsort(String[] colnos)
sort
int x[] = getColumnNos(colnos);
Arrays.sort(x);
colnos = getFormatedColumnNo(x);
voidsort(String[] s)
{ method
if (s == null || s.length < 2) {
    return;
int l, j, ir, i;
String rra;
String[] ra = new String[s.length + 1];
for (int ix = 0; ix < s.length; ix++)
    ra[ix + 1] = s[ix];
...
String[]sort(String[] sArray)
Ordena l'array indicat en ordre ascendent
String[] sSort = null;
if (sArray != null) {
    sSort = new String[sArray.length];
    System.arraycopy(sArray, 0, sSort, 0, sArray.length);
    Arrays.sort(sSort);
return sSort;
String[]sort(String[] str)
sort
HashMap map = new HashMap();
for (int i = 0; i < str.length; i++) {
    map.put(new Integer(i), str[i]);
HashMap tmp = new HashMap();
for (int i = 0; i < str.length; i++) {
    char[] ch = str[i].toCharArray();
    StringBuffer sb = new StringBuffer();
...
String[]sort(String[] strArray)
sort
if (strArray == null)
    return null;
String tmp = "";
for (int i = 0; i < strArray.length; i++) {
    for (int j = 0; j < strArray.length - i - 1; j++) {
        if (strArray[j].compareTo(strArray[j + 1]) < 0) {
            tmp = strArray[j];
            strArray[j] = strArray[j + 1];
...
Stringsort(String[] strArray)
sort
Arrays.sort(strArray);
StringBuilder sb = new StringBuilder();
for (String str : strArray) {
    sb.append(str);
return sb.toString();
voidsort(T[] a, S[] a2)
Sorts the specified array of objects into ascending order, according to the Comparable natural ordering of its elements.
if (a.length != a2.length)
    throw new IllegalArgumentException("Arrays don't have same length!");
T[] aux = (T[]) a.clone();
S[] aux2 = (S[]) a.clone();
mergeSort(aux, aux2, a, a2, 0, a.length, 0);
T[]sort(T[] array)
sort
Arrays.sort(array);
return array;