GODPAPER | All Packages | All Classes | Index | Frames No Frames |
DListNode

Package | de.polygonal.ds
Class | public class DListNode
Inheritance | DListNode Object
Implements | LinkedListNode

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

Public Properties

| Property | Defined By
--- | --- | ---
|  | data : * The node's data. | DListNode
|  | next : DListNode The next node in the list being referenced. | DListNode
|  | prev : DListNode The previous node in the list being referenced. | DListNode

Public Methods

| Method | Defined By
--- | --- | ---
|  | DListNode(obj:*) Creates a new node storing a given item. | DListNode
|  | insertAfter(node:DListNode):void A helper function used solely by the DLinkedList class for inserting a given node after this node. | DListNode
|  | insertBefore(node:DListNode):void A helper function used solely by the DLinkedList class for inserting this node in front of a given node. | DListNode
|  | toString():String Prints out a string representing the current object. | DListNode
|  | unlink():void A helper function used solely by the DLinkedList class to unlink the node from the list. | DListNode

Property Detail

data | property

`public var data:*`

The node's data.

next | property |

`public var next:DListNode`

The next node in the list being referenced.

prev | property |

`public var prev:DListNode`

The previous node in the list being referenced.

Constructor Detail

DListNode | () | Constructor

`public function DListNode(obj:*)`

Creates a new node storing a given item.

Parameters

| `obj:*` — The data to store inside the node.

Method Detail

insertAfter | () | method

`public function insertAfter(node:DListNode):void`

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

Parameters

| `node:DListNode` — The node to insert.

insertBefore | () | method |

`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

| `node:DListNode` — A doubly linked list node.

toString | () | method |

`public function toString():String`

Prints out a string representing the current object.

Returns

| `String` — A string representing the current object.

unlink | () | method |

`public function unlink():void`

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

Thu Jan 16 2014, 01:11 PM +08:00