| Package | net.guttershark.util.collections |
| Class | public final class ArrayBounceIterator |
| Property | Defined by | ||
|---|---|---|---|
| length : int [read-only]
The collection length.
| ArrayBounceIterator | ||
| Method | Defined by | ||
|---|---|---|---|
|
ArrayBounceIterator(array:Array, isSkipRepeat:Boolean = true)
Constructor for ArrayBounceIterator instances.
| ArrayBounceIterator | ||
|
current():Object
The current element.
| ArrayBounceIterator | ||
|
dispose():void
Dispose of this iterator.
| ArrayBounceIterator | ||
|
hasNext():Boolean
There will always be a next item, as
when the pointer is at the end, it switches
direction.
| ArrayBounceIterator | ||
|
next():Object
The next element, or null.
| ArrayBounceIterator | ||
|
peek():Object
Return a
peek of the next element without
updating the array element pointer, or return
null if none. | ArrayBounceIterator | ||
|
reset():void
Resets the pointer.
| ArrayBounceIterator | ||
| length | property |
length:int [read-only]The collection length.
Implementation public function get length():int
| ArrayBounceIterator | () | constructor |
public function ArrayBounceIterator(array:Array, isSkipRepeat:Boolean = true)Constructor for ArrayBounceIterator instances.
Parametersarray:Array — The array to iterate over.
|
|
isSkipRepeat:Boolean (default = true) — If true iterate 0,1,2,1,0 rather than 0,1,2,2,1,0.
|
| current | () | method |
public function current():ObjectThe current element.
ReturnsObject |
| dispose | () | method |
public function dispose():voidDispose of this iterator.
| hasNext | () | method |
public function hasNext():BooleanThere will always be a next item, as when the pointer is at the end, it switches direction.
ReturnsBoolean |
| next | () | method |
public function next():ObjectThe next element, or null.
ReturnsObject |
| peek | () | method |
public function peek():Object
Return a peek of the next element without
updating the array element pointer, or return
null if none.
Object |
| reset | () | method |
public function reset():voidResets the pointer.