Supplier<T>.
| Modifier and Type | Method and Description |
|---|---|
| public default T | |
| public boolean | |
| public static <T> Lazy | |
| public default <R> Lazy | |
| public static <T> Lazy | |
| public void | |
| public T | |
| public static <T> Lazy | |
| public static <T> Lazy |
| get | back to summary |
|---|---|
| public default T get() Implements java. Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.
| |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() Indicates whether this lazy value has been initialized. | |
| lazy | back to summary |
|---|---|
| public static <T> Lazy Creates a strict lazy value using the provided Supplier. The supplier is guaranteed to only be invoked by at most one thread, and all threads will see the same published value when this returns. | |
| map | back to summary |
|---|---|
| public default <R> Lazy Creates a new lazy value derived from this lazy value using the provided value mapping function. | |
| pure | back to summary |
|---|---|
| public static <T> Lazy Creates a pure lazy value using the provided Supplier to initialize the value. The supplier may be invoked more than once, and the return value should be a purely computed value as the result may be a different instance each time. This is useful for building cache tables and other pure computations. | |
| set | back to summary |
|---|---|
| public void set(final T newValue) Sets this lazy value to the provided value.
| |
| value | back to summary |
|---|---|
| public T value() Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already. | |
| value | back to summary |
|---|---|
| public static <T> Lazy Creates a lazy value using the provided constant value. | |
| weak | back to summary |
|---|---|
| public static <T> Lazy Creates a lazy value using a weak reference to the provided value. | |