public CNode <K, V> removedAt(int pos, int flag, Gen gen) { BasicNode[] arr = array; int len = arr.Length; BasicNode[] narr = new BasicNode[len - 1]; JavaCompat.ArrayCopy(arr, 0, narr, 0, pos); JavaCompat.ArrayCopy(arr, pos + 1, narr, pos, len - pos - 1); return(new CNode <K, V>(bitmap ^ flag, narr, gen)); }
public CNode <K, V> updatedAt(int pos, BasicNode nn, Gen gen) { int len = array.Length; BasicNode[] narr = new BasicNode[len]; JavaCompat.ArrayCopy(array, 0, narr, 0, len); array.CopyTo(narr, 0); narr[pos] = nn; return(new CNode <K, V>(bitmap, narr, gen)); }
public CNode <K, V> insertedAt(int pos, int flag, BasicNode nn, Gen gen) { int len = array.Length; int bmp = bitmap; BasicNode[] narr = new BasicNode[len + 1]; JavaCompat.ArrayCopy(array, 0, narr, 0, pos); narr[pos] = nn; JavaCompat.ArrayCopy(array, pos, narr, pos + 1, len - pos); return(new CNode <K, V>(bmp | flag, narr, gen)); }
protected void dupTo(ConcurrentTrieDictionaryIterator <K, V> it) { it.level = this.level; it.ct = this.ct; it.depth = this.depth; it.current = this.current; // these need a deep copy JavaCompat.ArrayCopy(this.stack, 0, it.stack, 0, 7); JavaCompat.ArrayCopy(this.stackpos, 0, it.stackpos, 0, 7); // this one needs to be evaluated if (this.subiter == null) { it.subiter = null; } else { List <KeyValuePair <K, V> > lst = toList(this.subiter); this.subiter = lst.GetEnumerator(); it.subiter = lst.GetEnumerator(); } }