Class ParanoidHashMap<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<K,​V>

    public class ParanoidHashMap<K,​V>
    extends java.util.LinkedHashMap<K,​V>
    a debugging aid. This implementation complains if you stick an object in here which appears to use System.identityHashCode()
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long serialVersionUID  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void assertOverridesHashCode​(java.lang.Object o)  
      V put​(K arg0, V arg1)  
      void putAll​(java.util.Map<? extends K,​? extends V> arg0)  
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • ParanoidHashMap

        public ParanoidHashMap​(java.util.Map<K,​V> t)
                        throws java.lang.NullPointerException
        Throws:
        java.lang.NullPointerException - if t is null
      • ParanoidHashMap

        public ParanoidHashMap​(int size)
      • ParanoidHashMap

        public ParanoidHashMap()
    • Method Detail

      • put

        public V put​(K arg0,
                     V arg1)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class java.util.HashMap<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends V> arg0)
        Specified by:
        putAll in interface java.util.Map<K,​V>
        Overrides:
        putAll in class java.util.HashMap<K,​V>