Class InternalMap<K,​V>

  • Type Parameters:
    K - Key type.
    V - Value type.
    All Implemented Interfaces:
    ReadOnlyMap<K,​V>

    public abstract class InternalMap<K,​V>
    extends java.lang.Object
    implements ReadOnlyMap<K,​V>
    A map implemented using a ConcurrentHashMap. This class is a base class for other classes which are designed to be internal to the library, specifically as regards access to the map field. This class exposes a ReadOnlyMap which is safe to be exposed in our public API.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.ConcurrentMap<K,​V> map  
    • Constructor Summary

      Constructors 
      Constructor Description
      InternalMap()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.Object key)  
      boolean containsValue​(java.lang.Object value)  
      java.lang.Iterable<java.util.Map.Entry<K,​V>> entrySet()  
      V get​(java.lang.Object key)  
      boolean isEmpty()  
      java.lang.Iterable<K> keySet()  
      int size()  
      java.lang.Iterable<V> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • map

        protected final java.util.concurrent.ConcurrentMap<K,​V> map
    • Constructor Detail

      • InternalMap

        public InternalMap()
    • Method Detail

      • containsKey

        public final boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface ReadOnlyMap<K,​V>
      • containsValue

        public final boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface ReadOnlyMap<K,​V>
      • entrySet

        public final java.lang.Iterable<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface ReadOnlyMap<K,​V>
      • get

        public final V get​(java.lang.Object key)
        Specified by:
        get in interface ReadOnlyMap<K,​V>
      • keySet

        public final java.lang.Iterable<K> keySet()
        Specified by:
        keySet in interface ReadOnlyMap<K,​V>
      • size

        public final int size()
        Specified by:
        size in interface ReadOnlyMap<K,​V>
      • values

        public final java.lang.Iterable<V> values()
        Specified by:
        values in interface ReadOnlyMap<K,​V>