Skip to content

ListIterator


final class ListIterator<Type>(head:ListNode<Type>?) < Iterator<Type>

Iterator over a List.

  • head: Head node.

Factory Functions

Name Description
ListIterator Create a ListIterator.

Member Variables

Name Description
node:ListNode<Type>? Current node.

Member Functions

Name Description
hasNext Is there a next element?
next Get the next element.

Factory Function Details

function ListIterator<Type>(head:ListNode<Type>?) -> ListIterator<Type>

Create a ListIterator.

Member Function Details

hasNext

function hasNext() -> Boolean

Is there a next element?

next

function next() -> Type

Get the next element.