ListNode

ListNode

Express list element.

Constructor

(protected) new ListNode(data, prev, next)

Create node of list.

Parameters:
Name Type Default Description
data * null

the data of node.

prev * null

point the front node of this node.

next * null

point the next node of thie node.

Methods

getData() → {*}

Get the data of Node.

Returns:

The data of Node.

Type
*

setData(data)

Set the data of Node. public method for change data of node in list.

Parameters:
Name Type Description
data *

The data of Node.

getPrev() → {Node}

Get the front node.

Returns:

The front node.

Type
Node

(protected) setPrev(prev)

Set the front node.

Parameters:
Name Type Description
prev Node

The front node.

getNext() → {Node}

Get the next node.

Returns:

The Next node.

Type
Node

(protected) setNext(next)

Set the next node.

Parameters:
Name Type Description
next Node

The next node.