Documentation of 'org.ujmp.core.collections.map.CachedMap' Java class
CachedMap
org.ujmp.core.collections.map

Class CachedMap<K,V>

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.io.Serializable, java.lang.AutoCloseable, java.util.Map<K,V>, Wrapper<java.util.Map<K,V>>


    public class CachedMap<K,V>
    extends AbstractMap<K,V>
    implements Wrapper<java.util.Map<K,V>>, java.io.Flushable, java.io.Closeable
    See Also:
    Serialized Form
    • Nested Class Summary

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

        java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K,V>
    • Constructor Summary

      Constructors 
      Constructor and Description
      CachedMap(java.util.Map<K,V> source) 
      CachedMap(java.util.Map<K,V> source, java.util.Map<K,V> cache) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear() 
      void close() 
      boolean containsKey(java.lang.Object key) 
      boolean containsValue(java.lang.Object value) 
      void flush() 
      V get(java.lang.Object key) 
      java.util.Map<K,V> getCache() 
      java.util.Map<K,V> getWrappedObject()
      Returns the object that is wrapped inside the wrapper
      boolean isEmpty() 
      java.util.Set<K> keySet() 
      V put(K key, V value) 
      void putAll(java.util.Map<? extends K,? extends V> m) 
      V remove(java.lang.Object key) 
      void setWrappedObject(java.util.Map<K,V> object) 
      int size() 
      • Methods inherited from class java.util.AbstractMap

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

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

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • CachedMap

        public CachedMap(java.util.Map<K,V> source)
      • CachedMap

        public CachedMap(java.util.Map<K,V> source,
                         java.util.Map<K,V> cache)
    • Method Detail

      • clear

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

        public boolean containsKey(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,V>
        Overrides:
        containsKey in class AbstractMap<K,V>
      • containsValue

        public boolean containsValue(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K,V>
        Overrides:
        containsValue 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>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K,V>
        Overrides:
        isEmpty 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>
      • putAll

        public void putAll(java.util.Map<? extends K,? extends V> m)
        Specified by:
        putAll in interface java.util.Map<K,V>
        Overrides:
        putAll 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>
      • getWrappedObject

        public java.util.Map<K,V> getWrappedObject()
        Description copied from interface: Wrapper
        Returns the object that is wrapped inside the wrapper
        Specified by:
        getWrappedObject in interface Wrapper<java.util.Map<K,V>>
        Returns:
        the inner object
      • setWrappedObject

        public void setWrappedObject(java.util.Map<K,V> object)
      • getCache

        public java.util.Map<K,V> getCache()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.