DataStructuresCSharp/C#/Datastructures/DoublyLinkedList/DoublyLinkedListNode.cs

20 lines
586 B
C#

using C_.Datastructures.Generic;
namespace C_.Datastructures.DoublyLinkedList
{
internal class DoublyLinkedListNode<T> : UndirectedNode<T, DoublyLinkedListNode<T>>
{//Inherits from Node
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)
{
return new DoublyLinkedListNode<T>
{
Value = value,
Next = next,
Prev = prev
};
}
}
}