new LinkedList()
A basic linked list data structure.
- Source - core/LinkedList.js, line 13
Members
-
first :object
-
First element in the list.
- Default Value:
- null
- Source - core/LinkedList.js, line 31
-
last :object
-
Last element in the list.
- Default Value:
- null
- Source - core/LinkedList.js, line 37
-
next :object
-
Next element in the list.
- Default Value:
- null
- Source - core/LinkedList.js, line 19
-
prev :object
-
Previous element in the list.
- Default Value:
- null
- Source - core/LinkedList.js, line 25
-
total :number
-
Number of elements in the list.
- Default Value:
- 0
- Source - core/LinkedList.js, line 43
Methods
-
add(child) → {object}
-
Adds a new element to this linked list.
Parameters:
Name Type Description child
object The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.
Returns:
object -The child that was added.
- Source - core/LinkedList.js, line 49
-
callAll(callback)
-
Calls a function on all members of this list, using the member as the context for the callback. The function must exist on the member.
Parameters:
Name Type Description callback
function The function to call.
- Source - core/LinkedList.js, line 146
-
remove(child)
-
Removes the given element from this linked list if it exists.
Parameters:
Name Type Description child
object The child to be removed from the list.
- Source - core/LinkedList.js, line 97
-
reset()
-
Resets the first, last, next and previous node pointers in this list.
- Source - core/LinkedList.js, line 82