Class Index | File Index

Classes


Class RBTreeIterator


Defined in: DataStructures.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
RBTreeIterator(aggregate)
Class that implements the iterator for a red-black tree.
Field Summary
Field Attributes Field Name and Description
 
The aggregate relates to this iterator.
 
The pointer to the position.
Method Summary
Method Attributes Method Name and Description
 
Moves the iterator to the first position of the aggregate.
 
Returns the item stored at the position pointed by the iterator.
 
Returns the node stored at the position pointed by the iterator.
 
Checks if the iterator is out of the bounds of the aggregate.
 
last()
Moves the iterator to the last position of the aggregate.
 
next()
Moves the iterator to the next item.
 
Moves the iterator to the previous item.
Class Detail
RBTreeIterator(aggregate)
Class that implements the iterator for a red-black tree.
Parameters:
aggregate
{RBTree} The aggregate to scan.
Field Detail
aggregate
The aggregate relates to this iterator.

pointer
The pointer to the position.
Method Detail
{void} first()
Moves the iterator to the first position of the aggregate.
Returns:
{void}

{Object|undefined} getItem()
Returns the item stored at the position pointed by the iterator.
Returns:
{Object|undefined} The item stored or undefined if it's out of the bounds.

{RBNode|null} getNode()
Returns the node stored at the position pointed by the iterator.
Returns:
{RBNode|null} The node stored or null if it's out of the bounds.

{boolean} isDone()
Checks if the iterator is out of the bounds of the aggregate.
Returns:
{boolean} It return true if the iterator is out of the bounds of the aggregate, otherwise false.

{void} last()
Moves the iterator to the last position of the aggregate.
Returns:
{void}

{void} next()
Moves the iterator to the next item.
Returns:
{void}

{void} previous()
Moves the iterator to the previous item.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 23 2014 22:40:59 GMT+0200 (CEST)