Packagecom.addicted2flash.util.iterator
Classpublic class ListIterator
ImplementsIListIterator

Iterator for traversing ILists.



Public Methods
 MethodDefined by
  
Create a new ListIterator.
ListIterator
  
addObject(o:*):void
Inserts the specified element into the list.
ListIterator
  
hasNext():Boolean
Retrieves boolean flag whether the Iterator has a next object in its list
ListIterator
  
hasPrevious():Boolean
Retrieves boolean flag whether the IListIterator has a previous object in its list
ListIterator
  
next():*
Retrieves next object in data-structure
ListIterator
  
Retrieves previous object in data-structure
ListIterator
  
remove():void
Removes the last element from the underlying collection returned by the iterator.
ListIterator
  
setObject(o:*):void
Replaces the last element returned by next or previous with the specified element.
ListIterator
Constructor detail
ListIterator()constructor
public function ListIterator(list:IList)

Create a new ListIterator.

Parameters
list:IListIList
Method detail
addObject()method
public function addObject(o:*):void

Inserts the specified element into the list. The element is inserted immediately before the next element that would be returned by next, if any, and after the next element that would be returned by previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.)

Parameters
o:*
hasNext()method 
public function hasNext():Boolean

Retrieves boolean flag whether the Iterator has a next object in its list

Returns
Boolean — Boolean flag whether the Iterator has a next object in its list
hasPrevious()method 
public function hasPrevious():Boolean

Retrieves boolean flag whether the IListIterator has a previous object in its list

Returns
Boolean — Boolean flag whether the IListIterator has a previous object in its list
next()method 
public function next():*

Retrieves next object in data-structure

Returns
* — next object in data-structure
previous()method 
public function previous():*

Retrieves previous object in data-structure

Returns
* — previous object in data-structure
remove()method 
public function remove():void

Removes the last element from the underlying collection returned by the iterator.

setObject()method 
public function setObject(o:*):void

Replaces the last element returned by next or previous with the specified element. This call can be made only if neither ListIterator.remove nor ListIterator.add have been called after the last call to next or previous.

Parameters
o:*