Class AbstractMap<K,​V>

  • All Implemented Interfaces:
    java.util.Map<K,​V>
    Direct Known Subclasses:
    EquivalentHashMap, FastCopyHashMap

    public abstract class AbstractMap<K,​V>
    extends java.lang.Object
    implements java.util.Map<K,​V>
    Similar to the JDK's AbstractMap, this provides common functionality for custom map implementations. Unlike JDK's AbstractMap, there is no support for null keys.
    Since:
    4.0
    Author:
    Manik Surtani
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  AbstractMap.SimpleEntry<K,​V>  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Set<java.util.Map.Entry<K,​V>> entrySet  
      protected java.util.Set<K> keySet  
      protected java.util.Collection<V> values  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractMap()  
    • Field Detail

      • entrySet

        protected transient java.util.Set<java.util.Map.Entry<K,​V>> entrySet
      • keySet

        protected transient java.util.Set<K> keySet
      • values

        protected transient java.util.Collection<V> values
    • Constructor Detail

      • AbstractMap

        public AbstractMap()
    • Method Detail

      • hashCode

        public int hashCode()
      • hash

        protected static int hash​(java.lang.Object key)
      • eq

        protected static boolean eq​(java.lang.Object o1,
                                    java.lang.Object o2)
      • assertKeyNotNull

        protected static void assertKeyNotNull​(java.lang.Object key)