Нашел такой код в интернете:

Код:
var _collection: ICollectionView;
if ( data is Array ) {
_collection = new ArrayCollection( data as Array );
} else if ( data is ICollectionView ) {
_collection = new ICollectionView( data );
} else if ( data is IList ) {
_collection = new ListCollectionView( IList( data ) );
} else if ( data is XMLList ) {
_collection = new XMLListCollection( data as XMLList );
} else if ( data is XML ) {
var xl: XMLList = new XMLList();
xl += data;
_collection = new XMLListCollection( xl );
} else if ( data is ArrayCollection ) {
_collection = data as ArrayCollection;
} else {
var tmp: Array = [];
if ( data != null ) {
tmp.push( data );
}
_collection = new ArrayCollection( tmp );
}
Из XMLListCollection и ListCollectionView знаю как привести к массиву. А из ICollectionView, не очень.

Подскажите, пожалуйста.

Возможно есть более оптимальный способ, чем этот.
