/// <summary>Create a normal entry</summary> internal LinkedEntry(K key, V value, int hash, java.util.HashMap.HashMapEntry <K, V> next, java.util.LinkedHashMap.LinkedEntry <K, V> nxt, java.util.LinkedHashMap. LinkedEntry <K, V> prv) : base(key, value, hash, next) { this.nxt = nxt; this.prv = prv; }
public LinkedHashIterator(LinkedHashMap <K, V> _enclosing) { this._enclosing = _enclosing; _next = this._enclosing.header.nxt; lastReturned = null; expectedModCount = this._enclosing.modCount; }
public virtual void remove() { if (this._enclosing.modCount != this.expectedModCount) { throw new java.util.ConcurrentModificationException(); } if (this.lastReturned == null) { throw new System.InvalidOperationException(); } this._enclosing.remove(this.lastReturned.key); this.lastReturned = null; this.expectedModCount = this._enclosing.modCount; }
internal java.util.LinkedHashMap.LinkedEntry <K, V> nextEntry() { if (this._enclosing.modCount != this.expectedModCount) { throw new java.util.ConcurrentModificationException(); } java.util.LinkedHashMap.LinkedEntry <K, V> e = this._next; if (e == this._enclosing.header) { throw new java.util.NoSuchElementException(); } this._next = e.nxt; return(this.lastReturned = e); }
/// <summary>Create the header entry</summary> internal LinkedEntry() : base(default(K), default(V), 0, null) { nxt = prv = this; }