Class SoftHashMap<K,​V>

    • 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>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<K,​java.lang.ref.SoftReference<V>> map  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      SoftHashMap()  
      SoftHashMap​(java.util.Map<? extends K,​? extends V> map)  
    • Field Detail

      • map

        private transient java.util.Map<K,​java.lang.ref.SoftReference<V>> map
    • Constructor Detail

      • SoftHashMap

        public SoftHashMap()
      • SoftHashMap

        public SoftHashMap​(java.util.Map<? extends K,​? extends V> map)
    • Method Detail

      • getMap

        private java.util.Map<K,​java.lang.ref.SoftReference<V>> getMap()
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
        Specified by:
        clear in class AbstractMap<K,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
        Specified by:
        get in class AbstractMap<K,​V>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​V>
        Specified by:
        keySet in class AbstractMap<K,​V>
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Specified by:
        put in class AbstractMap<K,​V>
      • remove

        public V remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
        Specified by:
        remove in class AbstractMap<K,​V>
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​V>
        Specified by:
        size in class AbstractMap<K,​V>