public void Rotate(int amount) { if (amount == 0) { return; } for (int i = 0; i < Math.Abs(amount); i++) { if (amount > 0) { Current = Current.Next; } else { Current = Current.Previous; } } }
public void AddAt(T value, int stepFromCurrent) { Rotate(stepFromCurrent); Current = new DoubleLinkedNode <T>(Current.Previous, Current, value); }
public void Add(T value) { Current = new DoubleLinkedNode <T>(Current.Previous, Current, value); }
public CircularList(T val) { Head = Current = new DoubleLinkedNode <T>(val); }