Property | Defined 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 |
Method | Defined 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 | ||
Pushes a new node at the top of the list. | LinkedList | ||
removeHead():void
Removes the head. | LinkedList | ||
removeTail():void
Removes the tail. | LinkedList | ||
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 |
head | property |
head:ListNode
[read-only] Returns the head node of the list.
public function get head():ListNode
length | property |
length:uint
[read-only] Returns the length of the linked list.
public function get length():uint
LinkedList | () | Constructor |
public function LinkedList(iNum:int = 0, defaultData:* = null)
Creates a linked list.
ParametersiNum:int (default = 0 ) — The number of entries to fill when first created
| |
defaultData:* (default = null ) — The data to fill the entires with
|
append | () | method |
public function append(data:*):ListNode
Appends a new node at the bottom of the list.
Parameters
data:* — The data of the node
|
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.
ReturnsString —
|
push | () | method |
public function push(data:*):ListNode
Pushes a new node at the top of the list.
Parameters
data:* — The data of the node
|
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
|