ArrayUtil.copyOf()

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4950 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Tom Conkling
2008-03-04 03:18:31 +00:00
parent 0b068d5189
commit 8493434099
+9
View File
@@ -30,6 +30,15 @@ package com.threerings.util {
*/
public class ArrayUtil
{
/**
* Creates a shallow copy of the array.
* @TODO: add support for copy ranges and deep copies?
*/
public static function copyOf (arr :Array) :Array
{
return arr.slice();
}
/**
* Sort the specified array according to natural order- all elements
* must implement Comparable or be null.