private void PutAllForCreate(GenericHashMap <K, V> m) { for (IEnumerator <IHashMapEntry <K, V> > i = m.GetEnumerator(); i.MoveNext();) { IHashMapEntry <K, V> e = i.Current; PutForCreate(e.Key, e.Value); } }
/// <summary> /// return a shallow copy of the HashMap instance /// the keys and values are not cloned /// </summary> /// <returns></returns> public GenericHashMap <K, V> Clone() { GenericHashMap <K, V> result = new GenericHashMap <K, V>(); result.table = new HashMapEntry <K, V> [table.Length]; result.modCount = 0; result.size = 0; result.init(); result.PutAllForCreate(this); return(result); }
private IHashMapEntry <K, V> _next; // next entry to return internal HashEnumerator(GenericHashMap <K, V> theMap) { _map = theMap; _expectedModCount = _map.modCount; IHashMapEntry <K, V>[] t = theMap.table; int i = t.Length; IHashMapEntry <K, V> n = null; if (theMap.size != 0) { // advance to first entry while (i > 0 && (n = t[--i]) == null) { ; } } _next = n; _index = i; }
public EntrySet(GenericHashMap <K, V> theMap) { _map = theMap; }
public EntryEnumerator(GenericHashMap <K, V> h) : base(h) { }
public ValueEnumerator(GenericHashMap <K, V> h) : base(h) { }
public HashMapValues(GenericHashMap <K, V> map) { this.map = map; }
public HashMapKeys(GenericHashMap <K, V> map) { this.map = map; }