Package | mx.utils |
Class | public class ArrayUtil |
Inheritance | ArrayUtil Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
ArrayUtil.toArray()
method.
Public Properties
Public Methods
Method | Defined By | ||
---|---|---|---|
[static]
Returns the index of the item in the Array. | ArrayUtil | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
[static]
Ensures that an Object can be used as an Array. | ArrayUtil | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
Method Detail
getItemIndex | () | method |
public static function getItemIndex(item:Object, source:Array):int
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Returns the index of the item in the Array.
Parameters
item:Object — The item to find in the Array.
| |
source:Array — The Array to search for the item.
|
int — The index of the item, and -1 if the item is not in the list.
|
toArray | () | method |
public static function toArray(obj:Object):Array
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Ensures that an Object can be used as an Array.
If the Object is already an Array, it returns the object. If the object is not an Array, it returns an Array in which the only element is the Object. As a special case, if the Object is null, it returns an empty Array.
Parameters
obj:Object — Object that you want to ensure is an array.
|
Array — An Array. If the original Object is already an Array,
the original Array is returned. Otherwise, a new Array whose
only element is the Object is returned or an empty Array if
the Object was null.
|
Thu Dec 6 2018, 01:12 PM -08:00