Class InMemoryCache<K,V>
java.lang.Object
com.github.javaparser.symbolsolver.cache.InMemoryCache<K,V>
- Type Parameters:
K- The type of the key.V- The type of the value.
- All Implemented Interfaces:
com.github.javaparser.resolution.cache.Cache<K,V>
public class InMemoryCache<K,V>
extends Object
implements com.github.javaparser.resolution.cache.Cache<K,V>
A cache implementation that stores the information in memory.
The current implementation stores the values in memory in a
The current implementation stores the values in memory in a
WeakHashMap.-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <expectedK, expectedV>
InMemoryCache<expectedK, expectedV> create()Create a new instance for a cache in memory.booleanisEmpty()voidvoidvoidlongsize()com.github.javaparser.resolution.cache.CacheStatsstats()
-
Method Details
-
create
Create a new instance for a cache in memory.- Type Parameters:
expectedK- The expected type for the key.expectedV- The expected type for the value.- Returns:
- A newly created instance of
InMemoryCache.
-
put
-
get
-
remove
-
removeAll
-
contains
-
size
-
isEmpty
-
stats
-