Class SoftValueTreeMap<K,​V>

  • All Implemented Interfaces:
    java.util.Map<K,​V>

    public class SoftValueTreeMap<K,​V>
    extends ReferenceValueTreeMap<K,​V>
    This Map will remove entries when the value in the map has been cleaned from garbage collection
    • 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>
    • Constructor Detail

      • SoftValueTreeMap

        public SoftValueTreeMap()
      • SoftValueTreeMap

        public SoftValueTreeMap​(java.util.Comparator<K> comparator)
      • SoftValueTreeMap

        public SoftValueTreeMap​(java.util.SortedMap<K,​ValueRef<K,​V>> sorted)
    • Method Detail

      • create

        protected ValueRef<K,​V> create​(K key,
                                             V value,
                                             java.lang.ref.ReferenceQueue<V> q)
        Description copied from class: ReferenceValueMap
        Create new value ref instance.
        Specified by:
        create in class ReferenceValueMap<K,​V>
        Parameters:
        key - the key
        value - the value
        q - the ref queue
        Returns:
        new value ref instance