Packageorg.springextensions.actionscript.utils
SVN browsingArrayCollectionUtils.as
FisheyeArrayCollectionUtils.as
Classpublic final class ArrayCollectionUtils

Contains utilities for working with ArrayCollection objects.



Public Methods
 MethodDefined by
  
createFromCollectionView(view:ICollectionView):ArrayCollection
[static] Creates an ArrayCollection from the items in the given view.
ArrayCollectionUtils
  
createFromList(list:IList):ArrayCollection
[static] Creates an ArrayCollection from the items in the given list.
ArrayCollectionUtils
  
getItemsWithProperty(collection:ArrayCollection, name:String, value:*):ArrayCollection
[static] Returns an array collection with all items from the given collection that have property specified by the name parameter for which its value equals the given value.
ArrayCollectionUtils
  
removeItemsOfType(collection:ArrayCollection, type:Class):void
[static] Removes all items from the collection that are of the given type.
ArrayCollectionUtils
Method detail
createFromCollectionView()method
public static function createFromCollectionView(view:ICollectionView):ArrayCollection

Creates an ArrayCollection from the items in the given view.

Parameters
view:ICollectionView — the ICollectionView instance from which an arraycollection will be created

Returns
ArrayCollection — an ArrayCollection with the items from the view
createFromList()method 
public static function createFromList(list:IList):ArrayCollection

Creates an ArrayCollection from the items in the given list.

Parameters
list:IList — the IList instance from which an arraycollection will be created

Returns
ArrayCollection — an ArrayCollection with the items from the list
getItemsWithProperty()method 
public static function getItemsWithProperty(collection:ArrayCollection, name:String, value:*):ArrayCollection

Returns an array collection with all items from the given collection that have property specified by the name parameter for which its value equals the given value.

Parameters
collection:ArrayCollection
 
name:String
 
value:*

Returns
ArrayCollection
removeItemsOfType()method 
public static function removeItemsOfType(collection:ArrayCollection, type:Class):void

Removes all items from the collection that are of the given type. Subtypes will also be removed.

Parameters
collection:ArrayCollection — the collection from which to remove the items
 
type:Class — the class or interface of which the items will be removed