/** * Returns a shallow copy of this HashMap. The keys and values * themselves are not cloned. */ public synchronized Object clone() { try { expungeStaleEntries(); ConcurrentReferenceHashMap t = (ConcurrentReferenceHashMap) super.clone(); t.table = new Entry[table.length]; for (int i = table.length; i-- > 0;) { Entry e = table[i]; if (e != null) { t.table[i] = (Entry) e.clone(t.queue); e = e.getNext(); for (Entry k = t.table[i]; e != null; e = e.getNext()) { k.setNext((Entry) e.clone(t.queue)); k = k.getNext(); } } } t.keySet = null; t.entrySet = null; t.values = null; return t; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } }
/** * Returns a shallow copy of this HashMap. The keys and values * themselves are not cloned. */ public synchronized Object clone() { try { expungeStaleEntries(); ConcurrentReferenceHashMap t = (ConcurrentReferenceHashMap) super.clone(); t.table = new Entry[table.length]; for (int i = table.length; i-- > 0;) { Entry e = table[i]; if (e != null) { t.table[i] = (Entry) e.clone(t.queue); e = e.getNext(); for (Entry k = t.table[i]; e != null; e = e.getNext()) { k.setNext((Entry) e.clone(t.queue)); k = k.getNext(); } } } t.keySet = null; t.entrySet = null; t.values = null; return t; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } }
/** * Returns a shallow copy of this HashMap. The keys and values * themselves are not cloned. */ public synchronized Object clone() { try { expungeStaleEntries(); ConcurrentReferenceHashMap t = (ConcurrentReferenceHashMap) super.clone(); t.table = new Entry[table.length]; for (int i = table.length; i-- > 0;) { Entry e = table[i]; if (e != null) { t.table[i] = (Entry) e.clone(t.queue); e = e.getNext(); for (Entry k = t.table[i]; e != null; e = e.getNext()) { k.setNext((Entry) e.clone(t.queue)); k = k.getNext(); } } } t.keySet = null; t.entrySet = null; t.values = null; return t; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } }
count--; } else { Entry e = (Entry) old.clone(queue); old = old.getNext();
/** * Returns a shallow copy of this HashMap. The keys and values * themselves are not cloned. */ public synchronized Object clone() { try { expungeStaleEntries(); ConcurrentReferenceHashMap t = (ConcurrentReferenceHashMap) super.clone(); t.table = new Entry[table.length]; for (int i = table.length; i-- > 0;) { Entry e = table[i]; if (e != null) { t.table[i] = (Entry) e.clone(t.queue); e = e.getNext(); for (Entry k = t.table[i]; e != null; e = e.getNext()) { k.setNext((Entry) e.clone(t.queue)); k = k.getNext(); } } } t.keySet = null; t.entrySet = null; t.values = null; return t; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } }
count--; } else { Entry e = (Entry) old.clone(queue); old = old.getNext();
count--; } else { Entry e = (Entry) old.clone(queue); old = old.getNext();
count--; } else { Entry e = (Entry) old.clone(queue); old = old.getNext();