T - the type of the lazily computed valuepublic class LazyRef<T> extends Object implements Supplier<T>
reset(),
causing the next get() call to recompute the value.| Constructor and Description |
|---|
LazyRef(Supplier<T> factory)
Creates a new LazyRef with the given factory supplier.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Returns the cached value, computing it on first access or after a
reset(). |
void |
reset()
Invalidates the cached value so the next
get() call recomputes it. |
Copyright © 2000–2026 Apache Software Foundation. All rights reserved.