T - type of the object being held by Lazy@ThreadSafe public class Lazy<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Lazy<T> |
eagerly(T ref)
Instantiates
Lazy in an "eagerly" fashion setting it w/ the provided value of
type T directly, bypassing lazy initialization sequence |
T |
get() |
static <T> Lazy<T> |
lazily(Supplier<T> initializer)
Executes provided
initializer lazily, while providing for "exactly once" semantic,
to instantiate value of type T being subsequently held by the returned instance of
Lazy |
Copyright © 2024 The Apache Software Foundation. All rights reserved.