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

20 lines
588 B
C#

using C_.Datastructures.Generic;
namespace C_.Datastructures.DoublyLinkedList
{
internal class DoublyLinkedListNode<T> : UndirectedNode<T, DoublyLinkedListNode<T>>
{//Inherits from Node
internal 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
};
}
}
}