<p>
Reverses the order of the given array.
</p>

<p>
There is no special handling for multi-dimensional arrays.
</p>

@param a
500257
public static void reverse(final Object[] a) {
        if (N.isNullOrEmpty(a)) {
            return;
        }

        reverse(a, 0, a.length);
    }
985408
public static <E extends Comparable<E>> void sort(E[] array) {
        int index = 0;
        E value = null;
        
        for(int i = 1; i < array.length; i++) {
            index = i;
            value = array[index];

            while(index > 0 && value.compareTo(array[index - 1]) < 0) {
                array[index] = array[index - 1];
                
                index--;
            }
            
            array[index] = value;
        }
    }
382519
function reverseInplace(array) {
  for (var i = 0; i < array.length / 2; ++i) {
    var h = array[i];
    var ii = array.length - i - 1;
    array[i] = array[ii];
    array[ii] = h;
  }
}
275363
private static void reverse(int[] array, int start, int end) {
		for (int i = start, j = end; i < --j; ++i) {
			int t = array[i];
			array[i] = array[j];
			array[j] = t;
		}
	}
638105
public void inverse(double[] a) {
        int n = a.length;

        if (!Math.isPower2(n)) {
            throw new IllegalArgumentException("The data vector size is not a power of 2.");
        }

        if (n < ncof) {
            throw new IllegalArgumentException("The data vector size is less than wavelet coefficient size.");
        }

        int start = n >> (int) Math.floor(Math.log2(n/(ncof-1)));
        for (int nn = start; nn <= n; nn <<= 1) {
            backward(a, nn);
        }
    }
1248090
public static void reverse(byte[] bytes) {
    for (int i = 0; i < bytes.length / 2; i++) {
      byte temp = bytes[i];
      bytes[i] = bytes[bytes.length - 1 - i];
      bytes[bytes.length - 1 - i] = temp;
    }
  }
812627
function reverse(a) {
  var len = a.length;
  for (var i = 0; i < Math.floor(len/2); i++) {
    [a[i], a[len-i-1]] = [a[len-i-1], a[i]];
  }
  return a;
}
397278
private static void reverse(final byte[] arr, final int len) {
        for (int l = 0, r = 0 + len - 1; l < r; l++, r--) {
            final byte tmp = arr[l];
            arr[l] = arr[r];
            arr[r] = tmp;
        }
    }
237390
static void sort(byte[] a, int left, int right) {
        // Use counting sort on large arrays
        if (right - left > COUNTING_SORT_THRESHOLD_FOR_BYTE) {
            int[] count = new int[NUM_BYTE_VALUES];

            for (int i = left - 1; ++i <= right;
                count[a[i] - Byte.MIN_VALUE]++
            );
            for (int i = NUM_BYTE_VALUES, k = right + 1; k > left; ) {
                while (count[--i] == 0);
                byte value = (byte) (i + Byte.MIN_VALUE);
                int s = count[i];

                do {
                    a[--k] = value;
                } while (--s > 0);
            }
        } else { // Use insertion sort on small arrays
            for (int i = left, j = i; i < right; j = ++i) {
                byte ai = a[i + 1];
                while (ai < a[j]) {
                    a[j + 1] = a[j];
                    if (j-- == left) {
                        break;
                    }
                }
                a[j + 1] = ai;
            }
        }
    }
1072818
private function array_reverse_iterator (array $a, $preserveKeys = false)
  {
    if ($preserveKeys)
      for (end ($a); ($key = key ($a)) !== null; prev ($a))
        yield $key => current ($a);
    else for (end ($a); ($key = key ($a)) !== null; prev ($a))
      yield current ($a);
  }
499758
public static void sort(double[] doubleArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (doubleArray.length - 1 ); i++) {
                if(doubleArray[i] > doubleArray[i + 1]) {
                    TrivialSwap.swap(doubleArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
921004
public static void sortDescending(long[] longArray) {
        int index = 0;
        long value = 0;
        
        for(int i = 1; i < longArray.length; i++) {
            index = i;
            value = longArray[index];
            
            while(index > 0 && value > longArray[index - 1]) {
                longArray[index] = longArray[index - 1];
                
                index--;
            }
            
            longArray[index] = value;
        }
    }
16384
private static void resplit(final double a[]) {
        final double c = a[0] + a[1];
        final double d = -(c - a[0] - a[1]);

        if (c < 8e298 && c > -8e298) { // MAGIC NUMBER
            double z = c * HEX_40000000;
            a[0] = (c + z) - z;
            a[1] = c - a[0] + d;
        } else {
            double z = c * 9.31322574615478515625E-10;
            a[0] = (c + z - c) * HEX_40000000;
            a[1] = c - a[0] + d;
        }
    }
416641
public void sortReverse() {
    Arrays.sort(this.elements, 0, this.size);
    for (int i = 0; i < this.size / 2; i++) {
      long temp = this.elements[i];
      this.elements[i] = this.elements[this.size - i - 1];
      this.elements[this.size - i - 1] = temp;
    }
  }
800713
public static double[] array_clone(double[] a) {
        if(a == null) {
            return a;
        }
        return Arrays.copyOf(a, a.length);
    }
1231976
public static List<String> reverse(final String[] array) {
        
        ArgUtils.notNull(array, "array");
        if(array.length == 0) {
            return new ArrayList<String>();
        }
        
        final List<String> list = Arrays.asList(array);
        Collections.sort(list, new Comparator<String>() {
            
            @Override
            public int compare(final String str1, final String str2) {
                
                int len1 = str1.length();
                int len2 = str2.length();
                
                if(len1 != len2) {
                    // 逆順
                    return Integer.compare(len1, len2) * -1;
                } else {
                    // 逆順
                    return str1.compareTo(str2) * 1;
                }
            }
        });
        
        return list;
    }
485305
private void reverseRange(Buffer a, int lo, int hi) {
    hi--;
    while (lo < hi) {
      s.swap(a, lo, hi);
      lo++;
      hi--;
    }
  }