Class ConcurrentHashMapV8.CollectionView<K,V,E>

java.lang.Object
org.glassfish.jersey.internal.util.collection.ConcurrentHashMapV8.CollectionView<K,V,E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>
Direct Known Subclasses:
ConcurrentHashMapV8.EntrySetView, ConcurrentHashMapV8.KeySetView, ConcurrentHashMapV8.ValuesView
Enclosing class:
ConcurrentHashMapV8<K,V>

abstract static class ConcurrentHashMapV8.CollectionView<K,V,E> extends Object implements Collection<E>, Serializable
Base class for views.
  • Field Details

  • Constructor Details

  • Method Details

    • getMap

      public ConcurrentHashMapV8<K,V> getMap()
      Returns the map backing this view.
      Returns:
      the map backing this view
    • clear

      public final void clear()
      Removes all of the elements from this view, by removing all the mappings from the map backing this view.
      Specified by:
      clear in interface Collection<K>
    • size

      public final int size()
      Specified by:
      size in interface Collection<K>
    • isEmpty

      public final boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<K>
    • iterator

      public abstract Iterator<E> 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.
      Specified by:
      iterator in interface Collection<K>
      Specified by:
      iterator in interface Iterable<K>
    • contains

      public abstract boolean contains(Object o)
      Specified by:
      contains in interface Collection<K>
    • remove

      public abstract boolean remove(Object o)
      Specified by:
      remove in interface Collection<K>
    • toArray

      public final Object[] toArray()
      Specified by:
      toArray in interface Collection<K>
    • toArray

      public final <T> T[] toArray(T[] a)
      Specified by:
      toArray in interface Collection<K>
    • toString

      public final String toString()
      Returns a string representation of this collection. The string representation consists of the string representations of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(Object).
      Overrides:
      toString in class Object
      Returns:
      a string representation of this collection
    • containsAll

      public final boolean containsAll(Collection<?> c)
      Specified by:
      containsAll in interface Collection<K>
    • removeAll

      public final boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<K>
    • retainAll

      public final boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<K>