Documentation / base / ListIterator
Class: ListIterator<T>
Defined in: libs/base/src/linkedlist.ts:5
The list iterator class
Type Parameters
T
T = unknown
Accessors
reversed
Get Signature
get reversed():
boolean
Defined in: libs/base/src/linkedlist.ts:105
Returns whether the iterator is reversed.
Returns
boolean
true if the iterator is reversed, otherwise false
list
Get Signature
get list():
List<T>
Defined in: libs/base/src/linkedlist.ts:115
Returns the list object to which the iterator belongs.
Returns
List<T>
The list object to which the iterator belongs.
data
Get Signature
get data():
T
Defined in: libs/base/src/linkedlist.ts:125
Gets the data associated with the iterator
The exception is thrown if the iterator is invalid
Returns
T
Set Signature
set data(
val):void
Defined in: libs/base/src/linkedlist.ts:131
Parameters
val
T
Returns
void
Methods
valid()
valid():
boolean
Defined in: libs/base/src/linkedlist.ts:25
Check that the iterator points to a valid list node
Returns
boolean
true if the iterator points to a valid list node, otherwise false
next()
next():
ListIterator<T>
Defined in: libs/base/src/linkedlist.ts:37
Let the iterator point to the next list node
Returns
ListIterator<T>
self
The exception is thrown if the iterator is not valid
getNext()
getNext():
ListIterator<T>
Defined in: libs/base/src/linkedlist.ts:53
Get a new iterator pointing to the next list node
Returns
ListIterator<T>
the new iterator
The exception is thrown if the iterator is not valid
prev()
prev():
ListIterator<T>
Defined in: libs/base/src/linkedlist.ts:68
Let the iterator point to the previous list node
Returns
ListIterator<T>
self
The exception is thrown if the iterator is not valid
getPrev()
getPrev():
ListIterator<T>
Defined in: libs/base/src/linkedlist.ts:84
Get a new iterator pointing to the previous list node
Returns
ListIterator<T>
the new iterator
The exception is thrown if the iterator is not valid