Exemplo n.º 1
0
        protected override MapLinkedEntry <K, V> CreateEntry(int hash, K key, V value, MapLinkedEntry <K, V> nextEntry)
        {
            MapLinkedEntry <K, V> entry = new MapLinkedEntry <K, V>(hash, key, value);

            entry.NextEntry = nextEntry;
            return(entry);
        }
Exemplo n.º 2
0
 public override void Remove()
 {
     if (!removeAllowed)
     {
         throw new NotSupportedException();
     }
     hashMap.Remove(currEntry.Key);
     currEntry = null;
 }
Exemplo n.º 3
0
 public override bool MoveNext()
 {
     if (first)
     {
         IListElem <E> firstElem = fastIterationList.First;
         if (firstElem == null)
         {
             return(false);
         }
         currEntry = firstElem.ElemValue;
         next      = currEntry.Next;
         first     = false;
         return(true);
     }
     else if (next == null)
     {
         return(false);
     }
     currEntry = next.ElemValue;
     next      = currEntry.Next;
     return(true);
 }
Exemplo n.º 4
0
 protected override bool EqualKeys(K key, MapLinkedEntry <K, V> entry)
 {
     return(Object.ReferenceEquals(key, entry.Key));
 }