| Package | sekati.collections |
| Class | public class ArrayBounceIterator |
| Implements | IIterator, IPointerIterator |
| Property | Defined by | ||
|---|---|---|---|
| length : int [read-only]
Return the collection length.
| ArrayBounceIterator | ||
| pointer : int
The interative pointer index.
| ArrayBounceIterator | ||
| Property | Defined by | ||
|---|---|---|---|
| _array : Array | ArrayBounceIterator | ||
| _isForward : Boolean | ArrayBounceIterator | ||
| _isSkipRepeat : Boolean | ArrayBounceIterator | ||
| _pointer : int | ArrayBounceIterator | ||
| Method | Defined by | ||
|---|---|---|---|
|
ArrayBounceIterator(array:Array, isSkipRepeat:Boolean = true)
ArrayBounceIterator Constructor
| ArrayBounceIterator | ||
|
current():Object
Return the current element
| ArrayBounceIterator | ||
|
hasNext():Boolean
We always have a next element as we bounce at each iteration end.
| ArrayBounceIterator | ||
|
next():Object
Returns the next element, or
null if none. | ArrayBounceIterator | ||
|
peek():Object
Return a
peek of the next element without
directionally iterating the pointer forwards, or return
null if none. | ArrayBounceIterator | ||
|
reset():void
Reset iterative pointer index.
| ArrayBounceIterator | ||
| Method | Defined by | ||
|---|---|---|---|
|
movePointer(isPreview:Boolean = false):int
Move the pointer in the proper direction; bounce at either end.
| ArrayBounceIterator | ||
| _array | property |
protected var _array:Array
| _isForward | property |
protected var _isForward:Boolean
| _isSkipRepeat | property |
protected var _isSkipRepeat:Boolean
| length | property |
length:int [read-only]Return the collection length.
Implementation public function get length():int
| _pointer | property |
protected var _pointer:int
| pointer | property |
pointer:int [read-write]The interative pointer index.
Implementation public function get pointer():int
public function set pointer(value:int):void
| ArrayBounceIterator | () | constructor |
public function ArrayBounceIterator(array:Array, isSkipRepeat:Boolean = true)ArrayBounceIterator Constructor
Parametersarray:Array — of collection elements.
|
|
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():ObjectReturn the current element
ReturnsObject |
| hasNext | () | method |
public function hasNext():BooleanWe always have a next element as we bounce at each iteration end.
ReturnsBoolean |
| movePointer | () | method |
protected function movePointer(isPreview:Boolean = false):intMove the pointer in the proper direction; bounce at either end.
ParametersisPreview:Boolean (default = false) — if true the pointer will not be iterated; but will return a preview pointer index.
|
int |
| next | () | method |
public function next():Object
Returns the next element, or null if none.
Object |
| peek | () | method |
public function peek():Object
Return a peek of the next element without
directionally iterating the pointer forwards, or return
null if none.
Object |
| reset | () | method |
public function reset():voidReset iterative pointer index.