@ThreadSafe public final class CachingTypeMapWrapper<H> extends Object implements TypeMap<H>
| Constructor and Description |
|---|
CachingTypeMapWrapper(com.google.common.cache.CacheBuilder<Type,Set<H>> cacheBuilder,
TypeMap wrapped) |
CachingTypeMapWrapper(TypeMap wrapped) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache() |
Set<H> |
getAll(Type t)
Get all Objects associated to all unrelated compatible types.
|
H |
getExact(Type t)
Get the the Object associated to type.
|
boolean |
putIfNotPresent(Type type,
H appender)
Associate object to type if no existing association present.
|
boolean |
remove(Type type)
remove type association.
|
void |
replace(Type t,
Function<H,H> f) |
String |
toString() |
public CachingTypeMapWrapper(com.google.common.cache.CacheBuilder<Type,Set<H>> cacheBuilder, TypeMap wrapped)
public CachingTypeMapWrapper(TypeMap wrapped)
public Set<H> getAll(Type t)
TypeMappublic boolean putIfNotPresent(Type type, H appender)
TypeMapputIfNotPresent in interface TypeMap<H>public boolean remove(Type type)
TypeMappublic H getExact(Type t)
TypeMappublic void clearCache()
Copyright © 2018 SPF4J. All rights reserved.