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

18 lines
531 B
C#
Raw Normal View History

2022-03-31 21:13:13 +00:00
namespace C_.Datastructures.Nodes
2022-03-06 09:10:17 +00:00
{
internal class DoublyLinkedListNode<T> : Node<T, DoublyLinkedListNode<T>>
{//Inherits from Node
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
2022-03-06 09:10:17 +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
};
}
}
}