套件 | mx.utils |
類別 | public class ArrayUtil |
繼承 | ArrayUtil Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
ArrayUtil.toArray()
method.
公用方法
方法 | 定義自 | ||
---|---|---|---|
[靜態]
Returns the index of the item in the Array. | ArrayUtil | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
[靜態]
Ensures that an Object can be used as an Array. | ArrayUtil | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
方法詳細資訊
getItemIndex | () | 方法 |
public static function getItemIndex(item:Object, source:Array):int
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Returns the index of the item in the Array.
參數
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 | () | 方法 |
public static function toArray(obj:Object):Array
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
參數
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.
|
Tue Jun 12 2018, 03:47 PM Z