Class CircularBuffer<T>.Node
- Namespace
- FishMMO.Shared
- Assembly
- FishMMO-SharedUtility.dll
A node in the circular doubly-linked list. Exposed publicly so callers can hold a reference for O(1) removal via Remove(Node?).
public class CircularBuffer<T>.Node
- Inheritance
-
CircularBuffer<T>.Node
- Inherited Members
Constructors
Node(T, Action?)
public Node(T value, Action? onRemove)
Parameters
valueTonRemoveAction
Properties
Next
The next node in the circular list (never null when the node is linked).
public CircularBuffer<T>.Node? Next { get; set; }
Property Value
OnRemove
Optional callback invoked when this node is removed from its owning list. Set at construction time via Add(T, Action<Node>?, Action?).
IMPORTANT: This callback is invoked while the list lock is held. Do NOT call Remove/Pop/Clear on the same list from this callback — it will deadlock.
public Action? OnRemove { get; set; }
Property Value
Previous
The previous node in the circular list (never null when the node is linked).
public CircularBuffer<T>.Node? Previous { get; set; }
Property Value
Value
The value stored in this node.
public T Value { get; set; }
Property Value
- T
Methods
Clear()
public void Clear()