DListNode

A doubly linked list node.

Each node acts as a data container and stores a reference to next and previous node in the list.

Summary
DListNodeA doubly linked list node.
Variables
dataThe node’s data.
nextThe next node in the list being referenced.
prevThe previous node in the list being referenced.
Functions
DListNodeCreates a new node storing a given item.
insertAfterA helper function used solely by the DLinkedList class for inserting a given node after this node.
insertBeforeA helper function used solely by the DLinkedList class for inserting this node in front of a given node.
unlinkA helper function used solely by the DLinkedList class to unlink the node from the list.
toStringPrints out a string representing the current object.

Variables

data

public var data: *

The node’s data.

next

public var next: DListNode

The next node in the list being referenced.

prev

public var prev: DListNode

The previous node in the list being referenced.

Functions

DListNode

public function DListNode(obj: *)

Creates a new node storing a given item.

Parameters

objThe data to store inside the node. 

insertAfter

public function insertAfter(node: DListNode):void

A helper function used solely by the DLinkedList class for inserting a given node after this node.

Parameters

nodeThe node to insert. 

insertBefore

public function insertBefore(node: DListNode):void

A helper function used solely by the DLinkedList class for inserting this node in front of a given node.

Parameters

nodeA doubly linked list node. 

unlink

public function unlink():void

A helper function used solely by the DLinkedList class to unlink the node from the list.

toString

public function toString():String

Prints out a string representing the current object.

Returns

A string representing the current object. 

A marker interface for the linked list nodes.
public var data: *
The node’s data.
public var next: DListNode
The next node in the list being referenced.
public var prev: DListNode
The previous node in the list being referenced.
public function DListNode(obj: *)
Creates a new node storing a given item.
public function insertAfter(node: DListNode):void
A helper function used solely by the DLinkedList class for inserting a given node after this node.
public function insertBefore(node: DListNode):void
A helper function used solely by the DLinkedList class for inserting this node in front of a given node.
public function unlink():void
A helper function used solely by the DLinkedList class to unlink the node from the list.
public function toString():String
Prints out a string representing the current object.
Close