2022-04-01 21:02:39 +00:00
|
|
|
|
using C_.Datastructures.Generic;
|
|
|
|
|
|
|
|
|
|
namespace C_.Datastructures.DoublyLinkedList
|
2022-03-06 09:10:17 +00:00
|
|
|
|
{
|
2022-04-02 20:22:20 +00:00
|
|
|
|
internal class DoublyLinkedListNode<T> : UndirectedNode<T, DoublyLinkedListNode<T>>
|
2022-03-31 20:27:31 +00:00
|
|
|
|
{//Inherits from Node
|
2022-03-08 21:34:37 +00:00
|
|
|
|
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
|
2022-03-06 09:10:17 +00:00
|
|
|
|
|
2022-03-08 21:34:37 +00:00
|
|
|
|
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)
|
2022-03-06 09:10:17 +00:00
|
|
|
|
{
|
|
|
|
|
return new DoublyLinkedListNode<T>
|
|
|
|
|
{
|
|
|
|
|
Value = value,
|
|
|
|
|
Next = next,
|
|
|
|
|
Prev = prev
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|