Home Reference Source
public class | source

Node

Node: an element to append or insert into a LinkedList Usage: let node = new Node('A'); let nextNode = new Node('B'); node.setNext(nextNode);

Constructor Summary

Public Constructor
public

constructor(element: *)

Member Summary

Public Members
public

element: *

public

next: *

public

Method Summary

Public Methods
public

Get the next node of this node to the Node instance provided.

public

Returns true if the node has a next node specified.

public

setNext(The: Node): void

Set the next node of this node to the Node instance provided.

Public Constructors

public constructor(element: *) source

Params:

NameTypeAttributeDescription
element *

Public Members

public element: * source

public next: * source

public previous: * source

Public Methods

public getNext(): Node source

Get the next node of this node to the Node instance provided.

Return:

Node

the next node, if present.

public hasNext(): Boolean source

Returns true if the node has a next node specified.

Return:

Boolean

public setNext(The: Node): void source

Set the next node of this node to the Node instance provided.

Params:

NameTypeAttributeDescription
The Node

node to set as the next.

Return:

void