A static class that defines methods used for an ArrayCollection instance.
public static function extracItemValuesByKey(arr:ArrayCollection, key:String):Array
A static method that returns an ArrayCollection instance's item values by key as Array.
Parameters
| arr:ArrayCollection — ArrayCollection instance from which to extract values by key.
|
| |
| key:String — Key string to extract.
|
Returns
| Array — An array of values extracted from an ArrayCollection instance. This result only has
values and no keys.
|
public static function extractDistinctItemsByKey(arr:ArrayCollection, key:String, sort:Boolean = false):ArrayCollection
A static method that returns a new ArrayCollection instance with distinct data for a specific field.
Parameters
| arr:ArrayCollection — ArrayCollection instance from which to extract dictinct items by key.
|
| |
| key:String — Key string to extract.
|
| |
| sort:Boolean (default = false) — A flag indicating whether to sort or not.
|
Returns
| ArrayCollection — An arrayCollection instance with distinct data of a single dataField.
|
public static function setValuesByKey(arr:ArrayCollection, key:String, value:Object):void
A static method that sets an ArrayCollection instance's item values of a specific field as a specific value.
Parameters
| arr:ArrayCollection — ArrayCollection instance to apply new values.
|
| |
| key:String — Key string to indicate the dataField.
|
| |
| value:Object — New value object to apply.
|