/** Returns a {@link Collection} view of the values contained in this map. * The collection is backed by the map, so changes to the map are reflected * in the collection, and vice-versa. The collection supports element * removal, which removes the corresponding mapping from this map, via the * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. * It does not support the <tt>add</tt> or <tt>addAll</tt> operations. * * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator that * will never throw {@link ConcurrentModificationException}, and guarantees * to traverse elements as they existed upon construction of the iterator, * and may (but is not guaranteed to) reflect any modifications subsequent * to construction. */ @Override public Collection<TypeV> values() { return new AbstractCollection<TypeV>() { @Override public void clear ( ) { NonBlockingHashMap.this.clear ( ); } @Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); } @Override public Iterator<TypeV> iterator() { return new SnapshotV(); } }; }
/** Returns a {@link Collection} view of the values contained in this map. * The collection is backed by the map, so changes to the map are reflected * in the collection, and vice-versa. The collection supports element * removal, which removes the corresponding mapping from this map, via the * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. * It does not support the <tt>add</tt> or <tt>addAll</tt> operations. * * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator that * will never throw {@link ConcurrentModificationException}, and guarantees * to traverse elements as they existed upon construction of the iterator, * and may (but is not guaranteed to) reflect any modifications subsequent * to construction. */ @Override public Collection<TypeV> values() { return new AbstractCollection<TypeV>() { @Override public void clear ( ) { NonBlockingHashMap.this.clear ( ); } @Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); } @Override public Iterator<TypeV> iterator() { return new SnapshotV(); } }; }
/** Returns a {@link Collection} view of the values contained in this map. * The collection is backed by the map, so changes to the map are reflected * in the collection, and vice-versa. The collection supports element * removal, which removes the corresponding mapping from this map, via the * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. * It does not support the <tt>add</tt> or <tt>addAll</tt> operations. * * <p>The view's <tt>iterator</tt> is a "weakly consistent" iterator that * will never throw {@link ConcurrentModificationException}, and guarantees * to traverse elements as they existed upon construction of the iterator, * and may (but is not guaranteed to) reflect any modifications subsequent * to construction. */ @Override public Collection<TypeV> values() { return new AbstractCollection<TypeV>() { @Override public void clear ( ) { NonBlockingHashMap.this.clear ( ); } @Override public int size ( ) { return NonBlockingHashMap.this.size ( ); } @Override public boolean contains( Object v ) { return NonBlockingHashMap.this.containsValue(v); } @Override public Iterator<TypeV> iterator() { return new SnapshotV(); } }; }
@Override public Iterator<TypeV> iterator() { return new SnapshotV(); } };
@Override public Iterator<TypeV> iterator() { return new SnapshotV(); } };
@Override public Iterator<TypeV> iterator() { return new SnapshotV(); } };
/** Returns an enumeration of the values in this table. * @return an enumeration of the values in this table * @see #values() */ public Enumeration<TypeV> elements() { return new SnapshotV(); }
/** Returns an enumeration of the values in this table. * @return an enumeration of the values in this table * @see #values() */ public Enumeration<TypeV> elements() { return new SnapshotV(); }
@Override public Iterator<TypeV> iterator() { return new SnapshotV(); } };
/** Returns an enumeration of the values in this table. * @return an enumeration of the values in this table * @see #values() */ public Enumeration<TypeV> elements() { return new SnapshotV(); }
/** * Returns an enumeration of the values in this table. * * @return an enumeration of the values in this table * @see #values() */ public Enumeration<TypeV> elements() { return new SnapshotV(); }