Package org.ujmp.core.collections.map
Class CachedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.ujmp.core.collections.map.AbstractMap<K,V>
org.ujmp.core.collections.map.CachedMap<K,V>
- All Implemented Interfaces:
Closeable
,Flushable
,Serializable
,AutoCloseable
,Map<K,
,V> Wrapper<Map<K,
V>>
public class CachedMap<K,V>
extends AbstractMap<K,V>
implements Wrapper<Map<K,V>>, Flushable, Closeable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
close()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) void
flush()
getCache()
Returns the object that is wrapped inside the wrapperboolean
isEmpty()
keySet()
void
void
setWrappedObject
(Map<K, V> object) int
size()
Methods inherited from class org.ujmp.core.collections.map.AbstractMap
beforeReadObject, beforeWriteObject, entrySet, get, getAsString, toString, values
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
source
-
cache
-
-
Constructor Details
-
CachedMap
-
CachedMap
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classAbstractMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V> - Overrides:
containsValue
in classAbstractMap<K,
V>
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
getWrappedObject
Description copied from interface:Wrapper
Returns the object that is wrapped inside the wrapper- Specified by:
getWrappedObject
in interfaceWrapper<K>
- Returns:
- the inner object
-
setWrappedObject
-
getCache
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Throws:
IOException
-