Package com.aparapi.internal.model
Class ValueCache<K,V,T extends Throwable>
java.lang.Object
com.aparapi.internal.model.ValueCache<K,V,T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
ValueCache.ThrowingValueComputer<K,
V, T extends Throwable> static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ValueCache.ThrowingValueComputer
<K, V, T> private final ConcurrentMap
<K, SoftReference<V>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ValueCache
(ValueCache.ThrowingValueComputer<K, V, T> computer) -
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent
(K key) void
static <K,
V, T extends Throwable>
ValueCache<K, V, T> on
(ValueCache.ThrowingValueComputer<K, V, T> computer)
-
Field Details
-
map
-
computer
-
-
Constructor Details
-
ValueCache
-
-
Method Details
-
on
public static <K,V, ValueCache<K,T extends Throwable> V, onT> (ValueCache.ThrowingValueComputer<K, V, T> computer) -
computeIfAbsent
- Throws:
T
-
invalidate
public void invalidate()
-