public void PushAllFrom(InterfaceFastList <V> list) { while (true) { IListElem <V> firstElem = list.PopFirst(); if (firstElem == null) { return; } PushLast(firstElem); } }
public static void InsertOrdered <T>(InterfaceFastList <T> list, IListElem <T> elemToInsert) where T : IComparable <T> { T value = elemToInsert.ElemValue; IListElem <T> pointer = list.First; while (pointer != null) { T existingDefEntry = pointer.ElemValue; if (existingDefEntry.CompareTo(value) < 0) { // DefEntry is of higher priority list.InsertBefore(elemToInsert, pointer); return; } pointer = pointer.Next; } // DefEntry is of the least priority list.PushLast(elemToInsert); }
public MapLinkedIterator(AbstractLinkedMap <E, K, V> hashMap, InterfaceFastList <E> fastIterationList, bool removeAllowed) : base(removeAllowed) { this.hashMap = hashMap; this.fastIterationList = fastIterationList; }
public SetLinkedIterator(AbstractLinkedSet <E, K> hashSet, InterfaceFastList <E> fastIterationList, bool removeAllowed) : base(removeAllowed) { this.hashSet = hashSet; this.fastIterationList = fastIterationList; }