Class GuavaCache<K,V>
java.lang.Object
com.github.javaparser.symbolsolver.cache.GuavaCache<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 GuavaCache<K,V>
extends Object
implements com.github.javaparser.resolution.cache.Cache<K,V>
This class is used to wrap a Guava
Cache.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <expectedK, expectedV>
GuavaCache<expectedK, expectedV> create(com.google.common.cache.Cache<expectedK, expectedV> guavaCache) Wrap a Guava cache with a custom cache.booleanisEmpty()voidvoidvoidlongsize()com.github.javaparser.resolution.cache.CacheStatsstats()
-
Constructor Details
-
GuavaCache
-
-
Method Details
-
create
public static <expectedK, expectedV> GuavaCache<expectedK, expectedV> create(com.google.common.cache.Cache<expectedK, expectedV> guavaCache) Wrap a Guava cache with a custom cache.- Type Parameters:
expectedK- The expected type for the key.expectedV- The expected type for the value.- Parameters:
guavaCache- The guava cache to be wrapped-- Returns:
- A newly created instance of
NoCache.
-
put
-
get
-
remove
-
removeAll
-
contains
-
size
-
isEmpty
-
stats
-