Packageverlocity.core
Classpublic final class LinkedList
InheritanceLinkedList Inheritance Object



Public Properties
 PropertyDefined By
  head : ListNode
[read-only] Returns the head node of the list.
LinkedList
  length : uint
[read-only] Returns the length of the linked list.
LinkedList
Public Methods
 MethodDefined By
  
LinkedList(iNum:int = 0, defaultData:* = null)
Creates a linked list.
LinkedList
  
Appends a new node at the bottom of the list.
LinkedList
  
clear():void
Removes all the linked list nodes.
LinkedList
  
list():String
Returns a string list of all the elements in the linked list.
LinkedList
  
push(data:*):ListNode
Pushes a new node at the top of the list.
LinkedList
  
removeHead():void
Removes the head.
LinkedList
  
removeTail():void
Removes the tail.
LinkedList
  
splice(node:ListNode):void
Removes a node from the linked list.
LinkedList
  
spliceData(data:*):void
Removes the first matching node with the matching data from the linked list.
LinkedList
Property Detail
headproperty
head:ListNode  [read-only]

Returns the head node of the list.


Implementation
    public function get head():ListNode
lengthproperty 
length:uint  [read-only]

Returns the length of the linked list.


Implementation
    public function get length():uint
Constructor Detail
LinkedList()Constructor
public function LinkedList(iNum:int = 0, defaultData:* = null)

Creates a linked list.

Parameters
iNum:int (default = 0) — The number of entries to fill when first created
 
defaultData:* (default = null) — The data to fill the entires with
Method Detail
append()method
public function append(data:*):ListNode

Appends a new node at the bottom of the list.

Parameters

data:* — The data of the node

Returns
ListNode
clear()method 
public function clear():void

Removes all the linked list nodes.

list()method 
public function list():String

Returns a string list of all the elements in the linked list.

Returns
String
push()method 
public function push(data:*):ListNode

Pushes a new node at the top of the list.

Parameters

data:* — The data of the node

Returns
ListNode
removeHead()method 
public function removeHead():void

Removes the head.

removeTail()method 
public function removeTail():void

Removes the tail.

splice()method 
public function splice(node:ListNode):void

Removes a node from the linked list.

Parameters

node:ListNode — The node to remove

spliceData()method 
public function spliceData(data:*):void

Removes the first matching node with the matching data from the linked list.

Parameters

data:* — The data to find and remove