| Package | org.spicefactory.lib.util |
| Class | public class ArrayUtil |
| Inheritance | ArrayUtil Object |
| Method | Defined By | ||
|---|---|---|---|
contains(arr:Array, element:*):Boolean [static]
Checks whether the Array contains the specified element. | ArrayUtil | ||
indexOf(arr:Array, element:*):int [static]
Returns the index of the first occurence of the specified element in the Array or -1 if the
Array does not contain that element. | ArrayUtil | ||
lastIndexOf(arr:Array, element:*):int [static]
Returns the index of the last occurence of the specified element in the Array or -1 if the
Array does not contain that element. | ArrayUtil | ||
remove(arr:Array, element:*):Boolean [static]
Removes the specified instance from the Array. | ArrayUtil | ||
| contains | () | method |
public static function contains(arr:Array, element:*):BooleanChecks whether the Array contains the specified element.
Parameters
arr:Array — the Array to examine
| |
element:* — the element to look for
|
Boolean — true if the Array contains the specified element
|
| indexOf | () | method |
public static function indexOf(arr:Array, element:*):intReturns the index of the first occurence of the specified element in the Array or -1 if the Array does not contain that element.
Parameters
arr:Array — the Array to examine
| |
element:* — the element to return the index for
|
int — the zero-based index of the first occurence of the specified element or -1 if the
Array does not contain that element
|
| lastIndexOf | () | method |
public static function lastIndexOf(arr:Array, element:*):intReturns the index of the last occurence of the specified element in the Array or -1 if the Array does not contain that element.
Parameters
arr:Array — the Array to examine
| |
element:* — the element to return the index for
|
int — the zero-based index of the last occurence of the specified element or -1 if the
Array does not contain that element
|
| remove | () | method |
public static function remove(arr:Array, element:*):BooleanRemoves the specified instance from the Array.
Parameters
arr:Array — the Array to remove the element from
| |
element:* — the element to remove
|
Boolean — true if the Array contained the specified element
|