Packagegs.util.iters
Classpublic class ArrayBidirectionalIterator
SubclassesArrayLoopableIterator

The ArrayBidirectionalIterator class provides a non-destructive, pointer-based, bi-directional array iterator.



Public Properties
 PropertyDefined by
  length : int
[read-only] The collection length.
ArrayBidirectionalIterator
Public Methods
 MethodDefined by
  
ArrayBidirectionalIterator(array:Array, copy:Boolean = true)
Constructor for ArrayBidirectionalIterator instances.
ArrayBidirectionalIterator
  
current():Object
The current element.
ArrayBidirectionalIterator
  
dispose():void
Dispose of this iterator.
ArrayBidirectionalIterator
  
glimpse():Object
Return a glimpse of the previous element without updating the array element pointer, or null.
ArrayBidirectionalIterator
  
hasNext():Boolean
Check if iterator has a next element.
ArrayBidirectionalIterator
  
hasPrevious():Boolean
Check if iterator has a previous element.
ArrayBidirectionalIterator
  
next():Object
The next element, or null.
ArrayBidirectionalIterator
  
peek():Object
Return a peek of the next element without updating the array element pointer, or null.
ArrayBidirectionalIterator
  
previous():Object
The previous element, or null.
ArrayBidirectionalIterator
  
reset():void
Resets the pointer.
ArrayBidirectionalIterator
Property detail
lengthproperty
length:int  [read-only]

The collection length.

Implementation
    public function get length():int
Constructor detail
ArrayBidirectionalIterator()constructor
public function ArrayBidirectionalIterator(array:Array, copy:Boolean = true)

Constructor for ArrayBidirectionalIterator instances.

Parameters
array:Array — The array to iterate over.
 
copy:Boolean (default = true) — Whether or not to copy the source array.
Method detail
current()method
public function current():Object

The current element.

Returns
Object
dispose()method 
public function dispose():void

Dispose of this iterator.

glimpse()method 
public function glimpse():Object

Return a glimpse of the previous element without updating the array element pointer, or null.

Returns
Object
hasNext()method 
public function hasNext():Boolean

Check if iterator has a next element.

Returns
Boolean
hasPrevious()method 
public function hasPrevious():Boolean

Check if iterator has a previous element.

Returns
Boolean
next()method 
public function next():Object

The next element, or null.

Returns
Object
peek()method 
public function peek():Object

Return a peek of the next element without updating the array element pointer, or null.

Returns
Object
previous()method 
public function previous():Object

The previous element, or null.

Returns
Object
reset()method 
public function reset():void

Resets the pointer.