Beispiel #1
0
        public void Remove(T1 key)
        {
            QList <T2> val = items[key];

            if (val != null)
            {
                if (sortedKeys.ContainsKey(val.indexValue))
                {
                    sortedKeys.Remove(val.indexValue);
                }
            }
            items.Remove(key);
        }
Beispiel #2
0
 public void MergeRange(QList <T2> list, bool addPositions = false)
 {
     foreach (T2 item in list.Each())
     {
         double pos = list.GetPosition(item);
         if (Contains(item))
         {
             if (addPositions)
             {
                 pos += GetPosition(item);
             }
             else
             {
                 pos = Math.Max(pos, GetPosition(item));
             }
         }
         AddIfNotExists(item);
         SetPosition(item, Convert.ToInt32(pos));
     }
 }