V - Resource value class.public final class ResourceCache<V> extends Object
ResourceLookup. Roughly the same thing can be achieved with a
MapMaker, but we want some logging in place too.| Constructor and Description |
|---|
ResourceCache(org.carrot2.shaded.guava.common.base.Function<ResourceLookup,V> valueMaker)
Create a resource cache with the provided value maker.
|
| Modifier and Type | Method and Description |
|---|---|
V |
get(ResourceLookup resourceLookup,
boolean recreate)
Acquire a resource from the resource lookup.
|
public ResourceCache(org.carrot2.shaded.guava.common.base.Function<ResourceLookup,V> valueMaker)
public V get(ResourceLookup resourceLookup, boolean recreate)