| Package | org.springextensions.actionscript.utils |
| Class | public class ArrayUtils |
Authors: Christophe Herreman, Simon Wacker (as2lib), Martin Heidegger (as2lib)
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1
| Method | Defined by | ||
|---|---|---|---|
|
clone(array:Array):Array
[static]
Clones an array.
| ArrayUtils | ||
|
getItemsByType(items:Array, type:Class):Array
[static]
Returns all items of the given array that of the given type.
| ArrayUtils | ||
|
isSame(array1:Array, array2:Array):Boolean
[static]
Compares the two arrays {
| ArrayUtils | ||
|
removeFirstOccurance(array:Array, item:*):Number
[static]
Removes the first occurance of the given {
| ArrayUtils | ||
|
removeItem(array:Array, item:*):Array
[static]
Removes all occurances of a the given {
| ArrayUtils | ||
|
removeLastOccurance(array:Array, item:*):Number
[static]
Removes the last occurance of the given {
| ArrayUtils | ||
|
shuffle(array:Array):void
[static]
Shuffles the items of the given {
| ArrayUtils | ||
| clone | () | method |
public static function clone(array:Array):ArrayClones an array.
Parametersarray:Array — the array to clone
|
Array — a clone of the passed-in { |
| getItemsByType | () | method |
public static function getItemsByType(items:Array, type:Class):ArrayReturns all items of the given array that of the given type.
Parametersitems:Array — the array that contains the items to look in
|
|
type:Class — the class that the items should match
|
Array — a new array with all items that match the given class
|
| isSame | () | method |
public static function isSame(array1:Array, array2:Array):BooleanCompares the two arrays {
Parametersarray1:Array — the first array for the comparison
|
|
array2:Array — the second array for the comparison
|
Boolean — { |
| removeFirstOccurance | () | method |
public static function removeFirstOccurance(array:Array, item:*):NumberRemoves the first occurance of the given {
Parametersarray:Array — the array to remove the item out of
|
|
item:* — the item to remove
|
Number — { |
| removeItem | () | method |
public static function removeItem(array:Array, item:*):ArrayRemoves all occurances of a the given {
Parametersarray:Array — the array to remove the item out of
|
|
item:* — the item to remove
|
Array — List that contains the index of all removed occurances
|
| removeLastOccurance | () | method |
public static function removeLastOccurance(array:Array, item:*):NumberRemoves the last occurance of the given {
Parametersarray:Array — the array to remove the item out of
|
|
item:* — the item to remove
|
Number — { |
| shuffle | () | method |
public static function shuffle(array:Array):voidShuffles the items of the given {
Parametersarray:Array — the array to shuffle
|