A handle to a lazily-computed value. Each Lazy computes its value on the first call to #get() and remembers that same value for all subsequent calls to get(). All implementations are expected to be thread-safe and compute their value at most once. Example The d
| 167 | * Lazy} for lazy computation in a single client. |
| 168 | */ |
| 169 | public interface Lazy<T extends @Nullable Object> { |
| 170 | /** |
| 171 | * Return the underlying value, computing the value if necessary. All calls to |
| 172 | * the same {@code Lazy} instance will return the same result. |
| 173 | */ |
| 174 | T get(); |
| 175 | } |
no outgoing calls
no test coverage detected