CollectionIterator : public class
Created: 04/26/07 10:55:47
Modified: 04/26/07 10:55:47
Project:
Advanced:
Concrete Iterator implementation which provides an API for traversing an ICollectionView 
@see mx.collections.ICollectionView
@see mx.collections.IList
@see mx.collections.CursorBookmark
@see mx.collections.IViewCursor
Attribute Details
protected ICollectionView
  collection
Notes: Defines the ICollectionView aggregate object instance
protected IViewCursor
  cursor
Notes: Defines the IViewCursor instance to the aggregate
private int
  index
Notes: Contains the current indexed position in the aggregate
Operation Details
public
CollectionIterator(
collection: ICollectionView,
):var
Sequential
Notes: Instantiates new CollectionIterator instance <br />@example simple CollectionIterator example is as follows:<br /><listing version="3.0"  var collection:ICollectionView new ArrayCollection(["A","B","C"]); var it:IIterator new CollectionIterator( collection );  while it.hasNext() trace( it.next(), it.position());  outputs: A, B, C, 2<br /></listing> <br />@param the collection in which to iterate over
public
hasNext():Boolean
Sequential
Notes: Determines if there are elements remaining in the ICollectionView <br />@inheritDoc
public
next():var
Sequential
Notes: Returns the next item in the ICollectionView <br />@inheritDoc
public
position():int
Sequential
Notes: Determines the IViewCursor position of the ICollectionView <br />@inheritDoc
public
reset():void
Sequential
Notes: Resets the IViewCursor to zero based indexed position <br />@see mx.collections.CursorBookmark#FIRST
public
setAggregate(
aggregate: Object,
):void
Sequential
Notes: Sets the collection in which to iterate over <br />@param an ICollectionView instance<br />@inheritDoc
Object Type Connection Notes
«interface» IIterator Interface Realisation