![]() |
Able
Askowl Base Library Enabler
|
LinkedList - a different perspective More...
Classes | |
| class | Node |
| LinkedList node More... | |
Public Member Functions | |
| LinkedList (string name=null) | |
| Get an instance of this type of linked list More... | |
| void | Destroy () |
| For the rare times we need to clear a linked list More... | |
| void | Dispose () |
| For the rare times we need to clear a linked list More... | |
| Node | Add (T item) |
| Add an Item to a List More... | |
| Node | GetRecycledOrNew () |
| Retrieve a node - either from recycling or creating it anew More... | |
| Node | ReverseLookup (T item) |
| For node disposal using reverse lookup More... | |
| void | Dispose (T item) |
| Node Dispose using reverse lookup More... | |
| Node | Push (T item) |
| Add an item to the list More... | |
| Node | Push (Node node) |
| Add a node to the list More... | |
| T | Pop () |
Retrieve the first list item - Node.Recycle More... | |
| T | Pull () |
| Pull the last item from the list More... | |
| string | Dump (int maxEntriesToDump=1000) |
| Return list contents as a string More... | |
| override string | ToString () |
Public Attributes | |
| string | Name |
| Linked List Name More... | |
| LinkedList< T > | RecycleBin => isRecycleBin ? null : recycleBin ?? (recycleBin = NewRecycleBin) |
| List for Unused Nodes More... | |
| Node | First |
| First Node in List or null More... | |
| Node | Last |
| Last Node in List or null More... | |
| Node | Second => First?.Next |
| Second item in the list or null More... | |
| bool | Empty => First == null |
| Is list empty? More... | |
Static Public Attributes | |
| static Func< T > | CreateItemStatic = GetDefaultCreateItem() |
| Item Creation and Preparation when new() is not enough More... | |
| static Action< Node > | ReactivateItemStatic = GetDefaultReactivateItem() |
| Actor we can create if reactivation requires additional code More... | |
| static Action< Node > | DeactivateItemStatic = GetDefaultDeactivateItem() |
| Called before an item is returned to recycling More... | |
| static bool | DebugMode = false |
| Debug mode logs changes More... | |
Properties | |
| Func< T > | CreateItem = () => CreateItemStatic() [set] |
| Item Creation and Preparation when new() is not enough More... | |
| Action< Node > | ReactivateItem = (node) => ReactivateItemStatic(node) [set] |
| Prepare an idle item for reuse More... | |
| Action< Node > | DeactivateItem = (node) => DeactivateItemStatic(node) [set] |
| For Deactivation when Dispose() is not enough More... | |
| static Func< Node, Node, int > | CompareItemStatic [set] |
| Used to insert items into the correct location for sorted lists More... | |
| Func< Node, Node, int > | CompareItem [set] |
| Used to insert items into the correct location for sorted lists More... | |
| int | Count [get] |
| Calculate number of items in a list More... | |
LinkedList - a different perspective
Definition at line 13 of file LinkedList.cs.
| Askowl.LinkedList< T >.LinkedList | ( | string | name = null | ) |
| Node Askowl.LinkedList< T >.Add | ( | T | item | ) |
Definition at line 196 of file LinkedList.cs.
| void Askowl.LinkedList< T >.Destroy | ( | ) |
For the rare times we need to clear a linked list
Definition at line 178 of file LinkedList.cs.
| void Askowl.LinkedList< T >.Dispose | ( | ) |
For the rare times we need to clear a linked list
Definition at line 187 of file LinkedList.cs.
| void Askowl.LinkedList< T >.Dispose | ( | T | item | ) |
| string Askowl.LinkedList< T >.Dump | ( | int | maxEntriesToDump = 1000 | ) |
Return list contents as a string
Definition at line 352 of file LinkedList.cs.
| Node Askowl.LinkedList< T >.GetRecycledOrNew | ( | ) |
Retrieve a node - either from recycling or creating it anew
Definition at line 204 of file LinkedList.cs.
| T Askowl.LinkedList< T >.Pop | ( | ) |
Retrieve the first list item - Node.Recycle
Definition at line 324 of file LinkedList.cs.
| T Askowl.LinkedList< T >.Pull | ( | ) |
Pull the last item from the list
Definition at line 332 of file LinkedList.cs.
| Node Askowl.LinkedList< T >.Push | ( | T | item | ) |
| Node Askowl.LinkedList< T >.Push | ( | Node | node | ) |
| Node Askowl.LinkedList< T >.ReverseLookup | ( | T | item | ) |
For node disposal using reverse lookup
Definition at line 213 of file LinkedList.cs.
| override string Askowl.LinkedList< T >.ToString | ( | ) |
Definition at line 364 of file LinkedList.cs.
|
static |
Item Creation and Preparation when new() is not enough
Definition at line 139 of file LinkedList.cs.
|
static |
Called before an item is returned to recycling
Definition at line 151 of file LinkedList.cs.
|
static |
Definition at line 343 of file LinkedList.cs.
| bool Askowl.LinkedList< T >.Empty => First == null |
Definition at line 312 of file LinkedList.cs.
| Node Askowl.LinkedList< T >.First |
Definition at line 303 of file LinkedList.cs.
| Node Askowl.LinkedList< T >.Last |
Definition at line 306 of file LinkedList.cs.
| string Askowl.LinkedList< T >.Name |
Definition at line 136 of file LinkedList.cs.
|
static |
Actor we can create if reactivation requires additional code
Definition at line 145 of file LinkedList.cs.
| LinkedList<T> Askowl.LinkedList< T >.RecycleBin => isRecycleBin ? null : recycleBin ?? (recycleBin = NewRecycleBin) |
Definition at line 293 of file LinkedList.cs.
| Node Askowl.LinkedList< T >.Second => First?.Next |
Second item in the list or null
Definition at line 309 of file LinkedList.cs.
|
set |
Used to insert items into the correct location for sorted lists
Definition at line 167 of file LinkedList.cs.
|
staticset |
Used to insert items into the correct location for sorted lists
Definition at line 157 of file LinkedList.cs.
|
get |
Calculate number of items in a list
Definition at line 315 of file LinkedList.cs.
|
set |
Item Creation and Preparation when new() is not enough
Definition at line 142 of file LinkedList.cs.
|
set |
For Deactivation when Dispose() is not enough
Definition at line 154 of file LinkedList.cs.
|
set |
Prepare an idle item for reuse
Definition at line 148 of file LinkedList.cs.