Project Outline
«
SmilText JS

Class cwi.adt.DoubleLinkedList

Defined in: cwi.adt.js.

Constructor Summary
new cwi.adt.DoubleLinkedList () DoubleLinkedList Implementation
Method Summary
insertBegin(data) Insert an object in the beginning of the list and change the iterator to this new element.
insertEnd(data) Insert an object in the end of the list and change the iterator to this new element.
insert(data) Insert an object right after the element pointed by the iterator and change the iterator to this new element.
remove() Remove and return the element before pointed by the iterator.
resetIterator() Point the iterator to the first element.
moveToPrevious() Move the iterator to the previous element.
moveToNext() Move the iterator to the next element.
hasNext() Return true if the iterator points to an element, otherwise, false.
getCurrent() Return the element pointed by the iterator.
getSize() Return the size of the list.
toString() Return the string representation of the list.
merge(l) Add a given list after the current list.
Constructor Detail
new cwi.adt.DoubleLinkedList()
DoubleLinkedList Implementation

Author: Rodrigo Laiola Guimaraes.

									
									
									
										
										
										
										
										
										
										
					
								
Method Detail
insertBegin(data)
Insert an object in the beginning of the list and change the iterator to this new element.

										
									
Parameters:
{Object} data Element to be inserted
insertEnd(data)
Insert an object in the end of the list and change the iterator to this new element.

										
									
Parameters:
{Object} data Element to be inserted
insert(data)
Insert an object right after the element pointed by the iterator and change the iterator to this new element. If the iterator is undefined, insert the object in the end of the list.

										
									
Parameters:
{Object} data Element to be inserted
remove() : Object
Remove and return the element before pointed by the iterator. Then, the iterator is moved to the next element of the list.

										
									
Returns:
{Object}
resetIterator()
Point the iterator to the first element.

										
									
moveToPrevious()
Move the iterator to the previous element.

										
									
moveToNext()
Move the iterator to the next element.

										
									
hasNext() : boolean
Return true if the iterator points to an element, otherwise, false.

										
									
Returns:
{boolean}
getCurrent() : Object
Return the element pointed by the iterator.

										
									
Returns:
{Object}
getSize() : integer
Return the size of the list.

										
									
Returns:
{integer}
toString() : string
Return the string representation of the list.

										
									
Returns:
{string}
merge(l)
Add a given list after the current list.

										
									
Parameters:
{cwi.adt.DoubleLinkedList} l the list that will be added after the current list
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Nov 09 2009 18:20:41 GMT+0100 (CET)