A doubly linked list node
Each node wraps an element and stores a reference to the next and previous list node.
DllNode objects are created and managed by the Dll class.
DllNode
Dll
new (val:T, list:Dll<T>)
Parameters:
val
the element to store in this node.
list
the list storing this node.
next:DllNode<T>
The next node in the list being referenced or null if this node has no next node.
prev:DllNode<T>
The previous node in the list being referenced or null if this node has no previous node.
val:T
The node's data.
free ():Void
Destroys this object by explicitly nullifying all pointers and elements for GC'ing used resources.
Improves GC efficiency/performance (optional).
toString ():String
Prints out all elements.