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

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

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

Public Properties

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

Public Methods

| Method | Defined By
--- | --- | ---
|  | SListNode(obj:*) Creates a new node storing a given item. | SListNode
|  | insertAfter(node:SListNode):void A helper function used solely by the SLinkedList class for inserting a given node after this node. | SListNode
|  | toString():String Prints out a string representing the current object. | SListNode

Property Detail

data | property

`public var data:*`

The node's data.

next | property |

`public var next:SListNode`

The next node in the list being referenced.

Constructor Detail

SListNode | () | Constructor

`public function SListNode(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:SListNode):void`

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

Parameters

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

toString | () | method |

`public function toString():String`

Prints out a string representing the current object.

Returns

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

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