Skip to content

StackIterator


final class StackIterator<Type>(head:StackNode<Type>?) < Iterator<Type>

Iterator over a Stack.

  • head: Head node.

Factory Functions

Name Description
StackIterator Create a StackIterator.

Member Variables

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

Member Functions

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

Factory Function Details

function StackIterator<Type>(head:StackNode<Type>?) -> StackIterator<Type>

Create a StackIterator.

Member Function Details

hasNext

function hasNext() -> Boolean

Is there a next element?

next

function next() -> Type

Get the next element.