Class AbstractCachingDictionary.ObservableCache

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map, Cache
    Enclosing class:
    AbstractCachingDictionary

    private static final class AbstractCachingDictionary.ObservableCache
    extends LRUCache
    • 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.Observable _observable  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObservableCache​(int capacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addObserver​(java.util.Observer obs)  
      java.lang.Object remove​(java.lang.Object key)
      Remotes the object associated with key and returns that object.
      • Methods inherited from class java.util.LinkedHashMap

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

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, 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, put, putAll, putIfAbsent, remove, replace, replace, size
    • Field Detail

      • _observable

        private java.util.Observable _observable
    • Constructor Detail

      • ObservableCache

        public ObservableCache​(int capacity)
    • Method Detail

      • addObserver

        public void addObserver​(java.util.Observer obs)
      • remove

        public java.lang.Object remove​(java.lang.Object key)
        Description copied from interface: Cache
        Remotes the object associated with key and returns that object.
        Specified by:
        remove in interface Cache
        Specified by:
        remove in interface java.util.Map
        Overrides:
        remove in class java.util.HashMap