Packagenet.guttershark.util.collections
Classpublic final class ArrayLoopableIterator
InheritanceArrayLoopableIterator Inheritance ArrayBidirectionalIterator

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



Public Properties
 PropertyDefined by
 Inheritedlength : int
The collection length.
ArrayBidirectionalIterator
Public Methods
 MethodDefined by
  
ArrayLoopableIterator(array:Array)
Constructor for ArrayLoopableIterator instances.
ArrayLoopableIterator
 Inherited
current():Object
The current element.
ArrayBidirectionalIterator
 Inherited
dispose():void
Dispose of this iterator.
ArrayBidirectionalIterator
  
glimpse():Object
Return a glimple of the previous element without updating the pointer.
ArrayLoopableIterator
  
hasNext():Boolean
This will always have a next element, because the pointer loops.
ArrayLoopableIterator
  
hasPrevious():Boolean
This will always have a previous element, because the pointer loop.
ArrayLoopableIterator
  
isAtEnd():Boolean
Return true if pointer is at the end of the collection.
ArrayLoopableIterator
  
isAtStart():Boolean
Return true if pointer is at the begining of the collection.
ArrayLoopableIterator
  
next():Object
Returns the next object, and will start over when reached the end.
ArrayLoopableIterator
  
peek():Object
Return a peek of the next element without updating the pointer.
ArrayLoopableIterator
  
previous():Object
Returns the previous object, and will go to the end once the pointer get's to the beginning.
ArrayLoopableIterator
 Inherited
reset():void
Resets the pointer.
ArrayBidirectionalIterator
Constructor detail
ArrayLoopableIterator()constructor
public function ArrayLoopableIterator(array:Array)

Constructor for ArrayLoopableIterator instances.

Parameters
array:Array — The array to iterate over.
Method detail
glimpse()method
public override function glimpse():Object

Return a glimple of the previous element without updating the pointer.

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

This will always have a next element, because the pointer loops.

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

This will always have a previous element, because the pointer loop.

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

Return true if pointer is at the end of the collection.

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

Return true if pointer is at the begining of the collection.

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

Returns the next object, and will start over when reached the end.

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

Return a peek of the next element without updating the pointer.

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

Returns the previous object, and will go to the end once the pointer get's to the beginning.

Returns
Object