new LinkedList(eqCompareropt)
Creates a new, empty doubly-linked LinkedList.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eqComparer |
EqualityComparer.<T> |
<optional> |
Optional. Defaults To EqualityComparer. |
- Source:
Members
_firstNode :LinkedListNode.<T>
Type:
- LinkedListNode.<T>
- Source:
_lastNode :LinkedListNode.<T>
Type:
- LinkedListNode.<T>
- Source:
_lookupSet :Set.<LinkedListNode.<T>>
Type:
- Set.<LinkedListNode.<T>>
- Source:
first
- Source:
isEmpty
- Source:
last
- Source:
observableNodeAdd :Observable.<LinkedListEvent.<T>>
Type:
- Observable.<LinkedListEvent.<T>>
- Source:
observableNodeRemove :Observable.<LinkedListEvent.<T>>
Type:
- Observable.<LinkedListEvent.<T>>
- Source:
size
- Source:
Methods
_add(node, item, after) → {LinkedListNode.<T>}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
node |
LinkedListNode.<T> | ||
item |
T | ||
after |
boolean | true |
- Source:
Returns:
The newly added node.
- Type
- LinkedListNode.<T>
_requireIsNode(node)
Parameters:
Name | Type | Description |
---|---|---|
node |
LinkedListNode.<T> |
- Source:
Throws:
-
If the given node is not a LinkedListNode.
- Type
- Error
_requireNotEmpty() → {boolean}
- Source:
Throws:
-
If this LinkedList is empty.
- Type
- Error
Returns:
true
- Type
- boolean
addAfter(node, item) → {LinkedListNode.<T>}
Parameters:
Name | Type | Description |
---|---|---|
node |
LinkedListNode.<T> | |
item |
T |
- Source:
Returns:
The newly created and inserted node.
- Type
- LinkedListNode.<T>
addBefore(node, item)
Parameters:
Name | Type | Description |
---|---|---|
node |
LinkedListNode.<T> | |
item |
T |
- Source:
addFirst(item) → {LinkedListNode.<T>}
Parameters:
Name | Type | Description |
---|---|---|
item |
T |
- Source:
Returns:
The node that has been created.
- Type
- LinkedListNode.<T>
addLast(item) → {LinkedListNode.<T>}
Parameters:
Name | Type | Description |
---|---|---|
item |
T |
- Source:
Returns:
The node that has been created.
- Type
- LinkedListNode.<T>
clear() → {this}
- Source:
Returns:
- Type
- this
(generator) entries() → {IterableIterator.<T>}
- Source:
Returns:
- Type
- IterableIterator.<T>
(generator) entriesReversed() → {IterableIterator.<T>}
- Source:
Returns:
- Type
- IterableIterator.<T>
has(item, eqCompareropt) → {boolean}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
item |
T | |||
eqComparer |
EqualityComparer.<T> |
<optional> |
null | an optional EqualityComparer to use. If not provided, will use the Collection's EqualityComparer. |
- Source:
Returns:
- Type
- boolean
hasNode(node) → {boolean}
Returns a value indicating whether or not this LinkedList has
the node provided.
Parameters:
Name | Type | Description |
---|---|---|
node |
LinkedListNode.<T> |
- Source:
Returns:
- Type
- boolean
(generator) nodes() → {IterableIterator.<LinkedListNode.<T>>}
- Source:
Returns:
- Type
- IterableIterator.<LinkedListNode.<T>>
(generator) nodesReversed() → {IterableIterator.<LinkedListNode.<T>>}
- Source:
Returns:
- Type
- IterableIterator.<LinkedListNode.<T>>
remove(node) → {LinkedListNode}
Parameters:
Name | Type | Description |
---|---|---|
node |
LinkedListNode.<T> |
- Source:
Returns:
The removed node
- Type
- LinkedListNode
removeFirst() → {LinkedListNode.<T>}
- Source:
Returns:
The first node after it has been removed
- Type
- LinkedListNode.<T>
removeLast() → {LinkedListNode.<T>}
- Source:
Returns:
The last node after it has been removed.
- Type
- LinkedListNode.<T>