-
Notifications
You must be signed in to change notification settings - Fork 1
DsLinkedList
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Implements: DsChain
A garbage-collected, linear-traversable linked-list.
// no example
Name | Type | Purpose |
---|---|---|
values... | undef |
none provided |
Jump To | top |
add | remove | first | has_next | next | find | copy | is |
---|
Returns: ChainLink
Name | Type | Purpose |
---|---|---|
value | mixed |
The value to add to the list |
Adds the given value to the list, and returns the link that contains it.
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
link | ChainLink |
The link to remove. |
Removes the given link from the list
Returns: ChainLink (or undefined
)
Name | Type | Purpose |
---|---|---|
None |
Returns the first link in the list. Returns undefined
if the list is empty.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
link | ChainLink |
The link to check. |
Returns if there are more links after the specified one.
Returns: ChainLink (or undefined
)
Name | Type | Purpose |
---|---|---|
link | ChainLink |
The link to check. |
Returns the next link after the specified one, or undefined
if this is the last one.
Returns: ChainLink (or undefined
)
Name | Type | Purpose |
---|---|---|
value | mixed |
The value to check for |
Searches the list for the given value and returns the link holding it, or undefined
if it isn't found.
Returns: DsLinkedList
Name | Type | Purpose |
---|---|---|
None |
Returns a copy of this DsLinkedList.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
type | Constructor |
The Constructor to compare this against. |
Returns true
if the provided type is DsLinkedList.
Jump To | top |
---|
- final - the final link in the list
Devon Mullane 2020