SListNode

A singly linked list node.

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

Summary
SListNodeA singly linked list node.
Variables
dataThe node’s data.
nextThe next node in the list being referenced.
Functions
SListNodeCreates a new node storing a given item.
insertAfterA helper function used solely by the SLinkedList class for inserting a given node after this node.
toStringPrints out a string representing the current object.

Variables

data

public var data: *

The node’s data.

next

public var next: SListNode

The next node in the list being referenced.

Functions

SListNode

public function SListNode(obj: *)

Creates a new node storing a given item.

Parameters

objThe data to store inside the node. 

insertAfter

public function insertAfter(node: SListNode):void

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

Parameters

nodeThe node to insert. 

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: SListNode
The next node in the list being referenced.
public function SListNode(obj: *)
Creates a new node storing a given item.
public function insertAfter(node: SListNode):void
A helper function used solely by the SLinkedList class for inserting a given node after this node.
public function toString():String
Prints out a string representing the current object.
Close