Class ConcurrentHashMapV8.EntrySetView<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.util.Map.Entry<K,​V>>, java.util.Collection<java.util.Map.Entry<K,​V>>, java.util.Set<java.util.Map.Entry<K,​V>>
    Enclosing class:
    ConcurrentHashMapV8<K,​V>

    static final class ConcurrentHashMapV8.EntrySetView<K,​V>
    extends ConcurrentHashMapV8.CollectionView<K,​V,​java.util.Map.Entry<K,​V>>
    implements java.util.Set<java.util.Map.Entry<K,​V>>, java.io.Serializable
    A view of a ConcurrentHashMapV8 as a Set of (key, value) entries. This class cannot be directly instantiated. See ConcurrentHashMapV8.entrySet().
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.util.Map.Entry<K,​V> e)  
      boolean addAll​(java.util.Collection<? extends java.util.Map.Entry<K,​V>> c)  
      boolean contains​(java.lang.Object o)  
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()
      Returns a "weakly consistent" iterator that will never throw 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.
      boolean remove​(java.lang.Object o)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        clear, containsAll, isEmpty, removeAll, retainAll, size, spliterator, toArray, toArray
    • Method Detail

      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<K>
        Specified by:
        contains in interface java.util.Set<K>
        Specified by:
        contains in class ConcurrentHashMapV8.CollectionView<K,​V,​java.util.Map.Entry<K,​V>>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<K>
        Specified by:
        remove in interface java.util.Set<K>
        Specified by:
        remove in class ConcurrentHashMapV8.CollectionView<K,​V,​java.util.Map.Entry<K,​V>>
      • iterator

        public java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()
        Description copied from class: ConcurrentHashMapV8.CollectionView
        Returns a "weakly consistent" iterator that will never throw 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.
        Specified by:
        iterator in interface java.util.Collection<K>
        Specified by:
        iterator in interface java.lang.Iterable<K>
        Specified by:
        iterator in interface java.util.Set<K>
        Specified by:
        iterator in class ConcurrentHashMapV8.CollectionView<K,​V,​java.util.Map.Entry<K,​V>>
        Returns:
        an iterator over the entries of the backing map
      • add

        public boolean add​(java.util.Map.Entry<K,​V> e)
        Specified by:
        add in interface java.util.Collection<K>
        Specified by:
        add in interface java.util.Set<K>
      • addAll

        public boolean addAll​(java.util.Collection<? extends java.util.Map.Entry<K,​V>> c)
        Specified by:
        addAll in interface java.util.Collection<K>
        Specified by:
        addAll in interface java.util.Set<K>
      • hashCode

        public final int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<K>
        Specified by:
        hashCode in interface java.util.Set<K>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<K>
        Specified by:
        equals in interface java.util.Set<K>
        Overrides:
        equals in class java.lang.Object