public Object next() { if (!hasNext()) throw new NoSuchElementException(); Entry e = lastReturned = entry; entry = e.getNext(); return type == KEYS ? e.getKey() : (type == VALUES ? e.getValue() : e); }
entrySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1);
entrySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1);
entrySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1);
entrySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1);
/** * Returns a Set view of the keys contained in this HashMap. The Set is * backed by the HashMap, so changes to the HashMap are reflected in the * Set, and vice-versa. The Set supports element removal, which removes * the corresponding mapping from the HashMap, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not * support the add or addAll operations. */ public Set keySet() { if (keySet == null) { keySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) { return ConcurrentReferenceHashMap.this.remove(o) != null; } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return keySet; }
/** * Returns a Set view of the keys contained in this HashMap. The Set is * backed by the HashMap, so changes to the HashMap are reflected in the * Set, and vice-versa. The Set supports element removal, which removes * the corresponding mapping from the HashMap, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not * support the add or addAll operations. */ public Set keySet() { if (keySet == null) { keySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) { return ConcurrentReferenceHashMap.this.remove(o) != null; } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return keySet; }
/** * Returns a Collection view of the values contained in this HashMap. * The Collection is backed by the HashMap, so changes to the HashMap are * reflected in the Collection, and vice-versa. The Collection supports * element removal, which removes the corresponding mapping from the * HashMap, via the Iterator.remove, Collection.remove, removeAll, * retainAll and clear operations. It does not support the add or addAll * operations. */ public Collection values() { if (values == null) { values = new java.util.AbstractCollection() { public Iterator iterator() { return new HashIterator(VALUES, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsValue(o); } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return values; }
/** * Returns a Set view of the keys contained in this HashMap. The Set is * backed by the HashMap, so changes to the HashMap are reflected in the * Set, and vice-versa. The Set supports element removal, which removes * the corresponding mapping from the HashMap, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not * support the add or addAll operations. */ public Set keySet() { if (keySet == null) { keySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) { return ConcurrentReferenceHashMap.this.remove(o) != null; } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return keySet; }
/** * Returns a Set view of the keys contained in this HashMap. The Set is * backed by the HashMap, so changes to the HashMap are reflected in the * Set, and vice-versa. The Set supports element removal, which removes * the corresponding mapping from the HashMap, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not * support the add or addAll operations. */ public Set keySet() { if (keySet == null) { keySet = new java.util.AbstractSet() { public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) { return ConcurrentReferenceHashMap.this.remove(o) != null; } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return keySet; }
/** * Returns a Collection view of the values contained in this HashMap. * The Collection is backed by the HashMap, so changes to the HashMap are * reflected in the Collection, and vice-versa. The Collection supports * element removal, which removes the corresponding mapping from the * HashMap, via the Iterator.remove, Collection.remove, removeAll, * retainAll and clear operations. It does not support the add or addAll * operations. */ public Collection values() { if (values == null) { values = new java.util.AbstractCollection() { public Iterator iterator() { return new HashIterator(VALUES, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsValue(o); } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return values; }
/** * Returns a Collection view of the values contained in this HashMap. * The Collection is backed by the HashMap, so changes to the HashMap are * reflected in the Collection, and vice-versa. The Collection supports * element removal, which removes the corresponding mapping from the * HashMap, via the Iterator.remove, Collection.remove, removeAll, * retainAll and clear operations. It does not support the add or addAll * operations. */ public Collection values() { if (values == null) { values = new java.util.AbstractCollection() { public Iterator iterator() { return new HashIterator(VALUES, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsValue(o); } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return values; }
/** * Returns a Collection view of the values contained in this HashMap. * The Collection is backed by the HashMap, so changes to the HashMap are * reflected in the Collection, and vice-versa. The Collection supports * element removal, which removes the corresponding mapping from the * HashMap, via the Iterator.remove, Collection.remove, removeAll, * retainAll and clear operations. It does not support the add or addAll * operations. */ public Collection values() { if (values == null) { values = new java.util.AbstractCollection() { public Iterator iterator() { return new HashIterator(VALUES, table.length - 1); } public int size() { return count; } public boolean contains(Object o) { return containsValue(o); } public void clear() { ConcurrentReferenceHashMap.this.clear(); } }; } return values; }
public Iterator iterator() { return new HashIterator(VALUES, table.length - 1); }
public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); }
public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1); }
public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); }
public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1); }
public Iterator iterator() { return new HashIterator(KEYS, table.length - 1); }
public Iterator iterator() { return new HashIterator(ENTRIES, table.length - 1); }