public class Memoizer<V> extends Object
Constructor and Description |
---|
Memoizer(Callable<V> compute)
Lazy initializer.
|
Memoizer(Callable<V> compute,
V val)
Eager initializer.
|
Modifier and Type | Method and Description |
---|---|
V |
clear()
Clear the cache, return the old value (or null if it had not been
computed yet).
|
V |
get()
Get the cached value (compute if necessary).
|
Copyright © 2015–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.