SListIterator |
A singly linked list iterator.
Provides some additional methods useful when dealing with linked lists. Be careful when using them together with the methods implemented through the Iterator interface since they both work differently.
SListIterator | A singly linked list iterator. |
Variables | |
node | The node the iterator is pointing to. |
list | The list this iterator uses. |
Functions | |
SListIterator | Creates a new SListIterator instance pointing to a given node. |
start | @inheritDoc |
next | @inheritDoc |
hasNext | @inheritDoc |
Properties | |
data | @inheritDoc |
data | @private |
Functions | |
end | Moves the iterator to the tail node. |
forth | Moves the iterator to the next node. |
valid | Checks if the current referenced node is valid. |
remove | Removes the node the iterator is pointing to. |
toString | Prints out a string representing the current object. |
The node the iterator is pointing to.
public var node: SListNode
The list this iterator uses.
public var list: SLinkedList
Creates a new SListIterator instance pointing to a given node.
public function SListIterator( list: SLinkedList = null, node: SListNode = null )
@inheritDoc
public function start():void
@inheritDoc
public function next():*
@inheritDoc
public function hasNext():Boolean
@inheritDoc
public function get data():*
Moves the iterator to the tail node.
public function end():void
Moves the iterator to the next node.
public function forth():void
Checks if the current referenced node is valid.
public function valid():Boolean
Removes the node the iterator is pointing to.
public function remove():Boolean
Prints out a string representing the current object.
public function toString():String