src/org/kocakosm/pitaya/util/XArrays.java
public static <T> T[] sort(T[] a)
	{
		T[] copy = copyOf(a);
		Arrays.sort(copy);
		return copy;
	}
public static <T> T[] sort(T[] a)
	{
		T[] copy = copyOf(a);
		Arrays.sort(copy);
		return copy;
	}
public static < T > T [ ] sort ( T [ ] a ) { T [ ] copy = copyOf ( a ) ; Arrays . sort ( copy ) ; return copy ; }
Returns a sorted copy of the given array of objects into ascending
order, according to the natural ordering of its elements (all
elements in the array must implement the {@link Comparable}
interface).

@param <T> the type of the elements in the array to sort.
@param a the array to be sorted.

@return a sorted copy of the given array.

@throws NullPointerException if {@code a} is {@code null}.
@throws ClassCastException if the array contains elements that are
not mutually comparable (for example, Strings and Integers).
@throws IllegalArgumentException if the natural ordering of the array
elements is found to violate the {@link Comparable} contract.

@see Arrays#sort(java.lang.Object[])
Returns a sorted copy of the given array of objects into ascending order according to the natural ordering of its elements ( all elements in the array must implement the { @link Comparable } interface ) .