ArrayUtil.copyOf()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4950 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -30,6 +30,15 @@ package com.threerings.util {
|
|||||||
*/
|
*/
|
||||||
public class ArrayUtil
|
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
|
* Sort the specified array according to natural order- all elements
|
||||||
* must implement Comparable or be null.
|
* must implement Comparable or be null.
|
||||||
|
|||||||
Reference in New Issue
Block a user