Class GuavaCache<K,V>
- java.lang.Object
-
- com.github.javaparser.symbolsolver.cache.GuavaCache<K,V>
-
-
Constructor Summary
Constructors Constructor Description GuavaCache(com.google.common.cache.Cache<K,V> guavaCache)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(K key)
static <expectedK,expectedV>
GuavaCache<expectedK,expectedV>create(com.google.common.cache.Cache<expectedK,expectedV> guavaCache)
Wrap a Guava cache with a custom cache.Optional<V>
get(K key)
boolean
isEmpty()
void
put(K key, V value)
void
remove(K key)
void
removeAll()
long
size()
CacheStats
stats()
-
-
-
Method Detail
-
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
.
-
stats
public CacheStats stats()
-
-